Skip to content

bpo-43916: _md5.md5 uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2021
Merged

bpo-43916: _md5.md5 uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25753

merged 1 commit into from
Apr 30, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 30, 2021

The following types use Py_TPFLAGS_DISALLOW_INSTANTIATION flag:

  • _md5.md5
  • _sha1.sha1
  • _sha256.sha224
  • _sha256.sha256
  • _sha512.sha384
  • _sha512.sha512

https://bugs.python.org/issue43916

The following types use Py_TPFLAGS_DISALLOW_INSTANTIATION flag:

* _md5.md5
* _sha1.sha1
* _sha256.sha224
* _sha256.sha256
* _sha512.sha384
* _sha512.sha512
@vstinner
Copy link
Member Author

Windows (x64): test_asyncio failed, I re-run all jobs.

@tiran
Copy link
Member

tiran commented Apr 30, 2021

Tests are failing. The failures look unrelated. Could you please file a bug report with asyncio and enum?

@tiran
Copy link
Member

tiran commented Apr 30, 2021

 ======================================================================
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

@vstinner
Copy link
Member Author

Tests are failing. The failures look unrelated. Could you please file a bug report with asyncio and enum?

I'm reporting test_asyncio failures for 2 years, nobody fix them. I sent two emails on python-dev.

I don't have the bandwidth to report the enum issue. I let someone else handling it ;-) It's unrelated to the PR.

@vstinner vstinner merged commit 665c774 into python:master Apr 30, 2021
@vstinner vstinner deleted the hash_disallow_instantiation branch April 30, 2021 16:40
@tiran
Copy link
Member

tiran commented Apr 30, 2021

@vstinner Could you please give me time to verify PRs against modules that I'm responsible for? I was in the middle of verifying that test issues were unrelated.

@vstinner
Copy link
Member Author

@vstinner Could you please give me time to verify PRs against modules that I'm responsible for? I was in the middle of verifying that test issues were unrelated.

Usually yes, but for this specific issue I couldn't, I needed to fix it before I leave for 1 week of holiday, and https://bugs.python.org/issue43916 was marked as a release blocker. I preferred to fix the issue than trying to explain the complex status "well, some types are fixed, but not all of them" :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants