[issue23819] test_asyncio fails when run under -O

2022-01-08 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Is anything left to do?

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 07229054a129a72b4ffdf29252eb73c6154c0ccf by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) 
(GH-30265)
https://github.com/python/cpython/commit/07229054a129a72b4ffdf29252eb73c6154c0ccf


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28482
pull_request: https://github.com/python/cpython/pull/30265

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc by Kumar Aditya in 
branch 'main':
bpo-23819: Fix asyncio tests on python optimized mode (GH-30195)
https://github.com/python/cpython/commit/a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 95948169d75bed3936284ea2225e83e07ec5fe20 by Miss Islington (bot) 
in branch '3.10':
bpo-23819: Get rid of assert statements in test_asyncio (GH-30212) (GH-30213)
https://github.com/python/cpython/commit/95948169d75bed3936284ea2225e83e07ec5fe20


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6ca78affc8023bc5023189d64d8050857662042a by Serhiy Storchaka in 
branch 'main':
bpo-23819: Get rid of assert statements in test_asyncio (GH-30212)
https://github.com/python/cpython/commit/6ca78affc8023bc5023189d64d8050857662042a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +28434
pull_request: https://github.com/python/cpython/pull/30213

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
nosy_count: 5.0 -> 6.0
pull_requests: +28433
pull_request: https://github.com/python/cpython/pull/30212

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-19 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +28416
pull_request: https://github.com/python/cpython/pull/30195

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 265918bb1d782ab85c7dbc835eb62d6cfc2145b7 by Kumar Aditya in 
branch 'main':
bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense 
(GH-29894)
https://github.com/python/cpython/commit/265918bb1d782ab85c7dbc835eb62d6cfc2145b7


--
nosy: +asvetlov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-12-02 Thread Kumar Aditya


Change by Kumar Aditya :


--
keywords: +patch
pull_requests: +28118
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29894

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-11-30 Thread Kumar Aditya


Kumar Aditya  added the comment:

I would like to tackle this, I'll work on this from next week.

--
nosy: +kumaraditya303

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-11-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'd be happy to mentor someone who wants to tackle this.

--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-11-29 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-11-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm sure there's more to it, but I found at least this failure:

~/cpython$ ./python.exe -O -m test test_asyncio -m test_set_event_loop
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 2.02 Run tests sequentially
0:00:00 load avg: 2.02 [1/1] test_asyncio
test test_asyncio failed -- Traceback (most recent call last):
  File "/Users/guido/cpython/Lib/test/test_asyncio/test_events.py", line 2595, 
in test_set_event_loop
self.assertRaises(AssertionError, policy.set_event_loop, object())
^^
AssertionError: AssertionError not raised by set_event_loop

test_asyncio failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
test_asyncio

Total duration: 134 ms
Tests result: FAILURE


Also this one:

~/cpython$ ./python.exe -O -m test test_asyncio -m 
test_create_datagram_endpoint_addr_error
0:00:00 load avg: 2.19 Run tests sequentially
0:00:00 load avg: 2.19 [1/1] test_asyncio
test test_asyncio failed -- Traceback (most recent call last):
  File "/Users/guido/cpython/Lib/test/test_asyncio/test_base_events.py", line 
1593, in test_create_datagram_endpoint_addr_error
self.assertRaises(
^^
  File "/Users/guido/cpython/Lib/unittest/case.py", line 734, in assertRaises
return context.handle('assertRaises', args, kwargs)
   
  File "/Users/guido/cpython/Lib/unittest/case.py", line 218, in handle
callable_obj(*args, **kwargs)
^
  File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 637, in 
run_until_complete
return future.result()
   ^^^
  File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 1287, in 
create_datagram_endpoint
infos = await self._ensure_resolved(

  File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 1369, in 
_ensure_resolved
info = _ipaddr_info(host, port, family, type, proto, *address[2:])
   ^^^
TypeError: _ipaddr_info() takes from 5 to 7 positional arguments but 12 were 
given

test_asyncio failed (1 error)

== Tests result: FAILURE ==

1 test failed:
test_asyncio

Total duration: 165 ms
Tests result: FAILURE


I think calling assertRaises(AssertionError, ...) is definitely an 
anti-pattern. We can't remove all assertions from the asyncio library, but I 
think the ones that are explicitly checked for by the tests should go, at 
least. (Probably replaced with TypeError or ValueError in most cases.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2021-11-27 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2019-10-21 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is still relevant 4 years later: many test_asyncio tests fail with 
python3 -O :-(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

Ton of failures along the lines of:

==
ERROR: test_ctor (test.test_asyncio.test_unix_events.UnixReadPipeTransportTests)
--
Traceback (most recent call last):
  File 
/Users/bcannon/Repositories/cpython/default/Lib/test/test_asyncio/test_unix_events.py,
 line 329, in setUp
self.loop = self.new_test_loop()
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/test_utils.py, 
line 413, in new_test_loop
self.set_event_loop(loop)
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/test_utils.py, 
line 407, in set_event_loop
events.set_event_loop(None)
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/events.py, 
line 581, in set_event_loop
get_event_loop_policy().set_event_loop(loop)
AttributeError: 'object' object has no attribute 'set_event_loop'

--
components: asyncio
messages: 239704
nosy: brett.cannon, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: test_asyncio fails when run under -O
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23819
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23819] test_asyncio fails when run under -O

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

-O disables assertions, and asyncio has a ton of assertions. Some tests maybe 
rely on them? I guess that they are real bugs (assert must be replaced with a 
regular if+raise) in the middle of the failures.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23819
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com