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: Enum deprecation breaks SSL tests
Type: behavior Stage: resolved
Components: asyncio, Library (Lib), Tests Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ethan.furman Nosy List: asvetlov, barry, brandtbucher, christian.heimes, eli.bendersky, ethan.furman, miss-islington, robertohueso, yselivanov
Priority: high Keywords: 3.10regression, 3.9regression, patch

Created on 2021-04-30 17:16 by christian.heimes, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25769 merged robertohueso, 2021-05-01 01:34
PR 25780 merged christian.heimes, 2021-05-01 13:40
PR 25793 merged ethan.furman, 2021-05-01 20:35
Messages (10)
msg392478 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-04-30 17:16
Ethan,

a recent change to enum module breaks ssltests. I'm running ssltests with python -Werror to detect deprecation issues. Could you please look into the matter and address the deprecation warning in asyncio?

https://github.com/python/cpython/runs/2477299020

 ======================================================================
ERROR: test_add_signal_handler_install_error3 (test.test_asyncio.test_unix_events.SelectorEventLoopSignalTests)
----------------------------------------------------------------------
test test_asyncio failed
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/asyncio/unix_events.py", line 116, in add_signal_handler
    signal.signal(sig, _sighandler_noop)
  File "/home/runner/work/cpython/cpython/Lib/unittest/mock.py", line 1105, in __call__
    return self._mock_call(*args, **kwargs)
  File "/home/runner/work/cpython/cpython/Lib/unittest/mock.py", line 1109, in _mock_call
    return self._execute_mock_call(*args, **kwargs)
  File "/home/runner/work/cpython/cpython/Lib/unittest/mock.py", line 1164, in _execute_mock_call
    raise effect
test.test_asyncio.test_unix_events.SelectorEventLoopSignalTests.test_add_signal_handler_install_error3.<locals>.Err

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/unittest/mock.py", line 1370, in patched
    return func(*newargs, **newkeywargs)
  File "/home/runner/work/cpython/cpython/Lib/test/test_asyncio/test_unix_events.py", line 165, in test_add_signal_handler_install_error3
    self.assertRaises(
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 732, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 201, in handle
    callable_obj(*args, **kwargs)
  File "/home/runner/work/cpython/cpython/Lib/asyncio/unix_events.py", line 129, in add_signal_handler
    raise RuntimeError(f'sig {sig} cannot be caught')
  File "/home/runner/work/cpython/cpython/Lib/enum.py", line 1019, in __format__
    warnings.warn(
DeprecationWarning: in 3.12 format() will use the enum member, not the enum member's value;
use a format specifier, such as :d for an IntEnum member, to maintainthe current display
msg392496 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2021-04-30 18:38
Whoops. I just meant to reference this issue, but I guess if the GitHub bots see an issue number in a PR comment they link that PR as a patch.
msg392509 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2021-04-30 19:51
Traveling at the moment, I'll check it out in a few hours.
msg392596 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-01 14:05
New changeset f82fd77717b58c97a16c05e25c72388b35860459 by Christian Heimes in branch 'master':
bpo-43989: Temporarily disable warnings in ssltests (GH-25780)
https://github.com/python/cpython/commit/f82fd77717b58c97a16c05e25c72388b35860459
msg392597 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-01 14:07
Ethan,

I have added a temporary workaround. Please revert f82fd77717b58c97a16c05e25c72388b35860459 when you fix the issue. Thanks!
msg392599 - (view) Author: Roberto Hueso (robertohueso) * Date: 2021-05-01 14:21
I opened PR 25769, I think it's the correct fix but I'm a new contributor, so not 100% sure.
Please, review when you have time :)
msg392617 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-01 18:54
Thanks Roberto! I leave the review to Ethan.
msg392634 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2021-05-01 20:34
New changeset 55e5c680dde39c934bf162965820787272ce95f9 by Roberto Hueso in branch 'master':
bpo-43989: Add signal format specifier for unix_events (GH-25769)
https://github.com/python/cpython/commit/55e5c680dde39c934bf162965820787272ce95f9
msg392636 - (view) Author: miss-islington (miss-islington) Date: 2021-05-01 20:54
New changeset 1ae05fdf2d0a4cf12e355ad74c437cbfa89c9b93 by Ethan Furman in branch 'master':
Revert "bpo-43989: Temporarily disable warnings in ssltests (GH-25780)" (GH-25793)
https://github.com/python/cpython/commit/1ae05fdf2d0a4cf12e355ad74c437cbfa89c9b93
msg392639 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-01 21:08
Thanks Ethan and Roberto!
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88155
2021-05-01 21:08:23christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg392639

stage: patch review -> resolved
2021-05-01 20:54:04miss-islingtonsetnosy: + miss-islington
messages: + msg392636
2021-05-01 20:35:46ethan.furmansetpull_requests: + pull_request24483
2021-05-01 20:34:37ethan.furmansetmessages: + msg392634
2021-05-01 18:54:41christian.heimessetmessages: + msg392617
2021-05-01 14:21:46robertohuesosetmessages: + msg392599
2021-05-01 14:07:22christian.heimessetpriority: deferred blocker -> high

messages: + msg392597
2021-05-01 14:05:11christian.heimessetmessages: + msg392596
2021-05-01 13:40:38christian.heimessetpull_requests: + pull_request24471
2021-05-01 01:34:32robertohuesosetnosy: + robertohueso

pull_requests: + pull_request24462
stage: needs patch -> patch review
2021-04-30 19:51:52ethan.furmansetmessages: + msg392509
2021-04-30 18:38:57brandtbuchersetmessages: + msg392496
stage: patch review -> needs patch
2021-04-30 18:38:47brandtbuchersetpull_requests: - pull_request24451
2021-04-30 18:37:11brandtbuchersetkeywords: + patch
nosy: + brandtbucher

pull_requests: + pull_request24451
stage: needs patch -> patch review
2021-04-30 17:16:16christian.heimescreate