[New-bugs-announce] [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline
Karthikeyan Singaravelan
report at bugs.python.org
Sat May 11 03:05:13 EDT 2019
New submission from Karthikeyan Singaravelan <tir.karthi at gmail.com>:
It seems there was a deprecation warning added in ad4ed872415d00fcdfaa52a08108ec752b115000 that causes error when test_asyncio.test_pep492.StreamReaderTests.test_readline is ran with -Werror.
➜ cpython git:(master) ./python.exe -Werror -m unittest -v test.test_asyncio.test_pep492.StreamReaderTests.test_readline
test_readline (test.test_asyncio.test_pep492.StreamReaderTests) ... ERROR
======================================================================
ERROR: test_readline (test.test_asyncio.test_pep492.StreamReaderTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_pep492.py", line 97, in test_readline
stream = asyncio.StreamReader(loop=self.loop)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/streams.py", line 446, in __init__
warnings.warn(f"{self.__class__} should be instaniated "
DeprecationWarning: <class 'asyncio.streams.StreamReader'> should be instaniated by asyncio internals only, please avoid its creation from user code
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (errors=1)
# Before commit
➜ cpython git:(master) git checkout ad4ed872415d00fcdfaa52a08108ec752b115000~1 Lib/asyncio
➜ cpython git:(master) ✗ ./python.exe -Werror -m unittest -v test.test_asyncio.test_pep492.StreamReaderTests.test_readline
test_readline (test.test_asyncio.test_pep492.StreamReaderTests) ... ok
----------------------------------------------------------------------
Ran 1 test in 0.004s
OK
----------
components: asyncio
messages: 342170
nosy: asvetlov, xtreak, yselivanov
priority: normal
severity: normal
status: open
title: DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36884>
_______________________________________
More information about the New-bugs-announce
mailing list