Skip to content

test_asyncio fails on refleaks buildbots #81329

Closed

Description

@pablogsal
BPO 37148
Nosy @vstinner, @asvetlov, @ambv, @1st1, @pablogsal
PRs
  • bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks #13800
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-06-04.10:26:33.694>
    created_at = <Date 2019-06-04.10:08:45.096>
    labels = ['3.8', 'type-bug', 'tests', 'expert-asyncio']
    title = 'test_asyncio fails on refleaks buildbots'
    updated_at = <Date 2019-06-04.10:26:33.693>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2019-06-04.10:26:33.693>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-04.10:26:33.694>
    closer = 'pablogsal'
    components = ['Tests', 'asyncio']
    creation = <Date 2019-06-04.10:08:45.096>
    creator = 'pablogsal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37148
    keywords = ['patch', 'buildbot']
    message_count = 4.0
    messages = ['344537', '344540', '344541', '344542']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'asvetlov', 'lukasz.langa', 'yselivanov', 'pablogsal']
    pr_nums = ['13800']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37148'
    versions = ['Python 3.8']

    Activity

    1. pablogsal commented on Jun 4, 2019

      @pablogsal
      MemberAuthor

      https://buildbot.python.org/all/#/builders/1/builds/609/steps/5/logs/stdio

      =====================================================================
      FAIL: test_stream_reader_create_warning (test.test_asyncio.test_streams.StreamTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_streams.py", line 1233, in test_stream_reader_create_warning
          asyncio.StreamReader
      AssertionError: DeprecationWarning not triggered

      ======================================================================
      FAIL: test_stream_writer_create_warning (test.test_asyncio.test_streams.StreamTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_streams.py", line 1237, in test_stream_writer_create_warning
          asyncio.StreamWriter
      AssertionError: DeprecationWarning not triggered

      The problem is that when the test is repeated using the -R, asyncio has cached already StreamReader and StreamWriter into globals, not triggering the warning again.

    2. asvetlov commented on Jun 4, 2019

      @asvetlov
      Contributor

      I'm curious if collections.__getattr__ suffers from the same problem?

      asyncio uses basically the same technique for deprecating global names on import.

    3. pablogsal commented on Jun 4, 2019

      @pablogsal
      MemberAuthor

      I'm curious if collections.__getattr__ suffers from the same problem?

      Very likely, the problem is that there is no test in test_collections for the deprecation warning, so this situation never happens.

    4. pablogsal commented on Jun 4, 2019

      @pablogsal
      MemberAuthor

      New changeset 4cdbc45 by Pablo Galindo in branch 'master':
      bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800)
      4cdbc45

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifetestsTests in the Lib/test dirtopic-asynciotype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions