This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_asyncio fails on refleaks buildbots
Type: behavior Stage: resolved
Components: asyncio, Tests Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, lukasz.langa, pablogsal, vstinner, yselivanov
Priority: normal Keywords: buildbot, patch

Created on 2019-06-04 10:08 by pablogsal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13800 merged pablogsal, 2019-06-04 10:10
Messages (4)
msg344537 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-04 10:08
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.
msg344540 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2019-06-04 10:19
I'm curious if collections.__getattr__ suffers from the same problem?

asyncio uses basically the same technique for deprecating global names on import.
msg344541 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-04 10:24
> 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.
msg344542 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-04 10:26
New changeset 4cdbc452ce308bb55523e53963cabdc988e3f44b by Pablo Galindo in branch 'master':
bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800)
https://github.com/python/cpython/commit/4cdbc452ce308bb55523e53963cabdc988e3f44b
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81329
2019-06-04 10:26:33pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-06-04 10:26:25pablogsalsetmessages: + msg344542
2019-06-04 10:24:16pablogsalsetmessages: + msg344541
2019-06-04 10:19:36asvetlovsetmessages: + msg344540
2019-06-04 10:10:00pablogsalsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request13686
2019-06-04 10:08:45pablogsalcreate