◐ Shell
clean mode source ↗

bpo-43916: Use Py_TPFLAGS_DISABLE_NEW flag in hashlib by tiran · Pull Request #25722 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Closed

tiran

wants to merge 3 commits into

Conversation

Add a new Py_TPFLAGS_DISABLE_NEW type flag to disallow creating
instances of a type.
Signed-off-by: Christian Heimes <christian@python.org>

@tiran tiran mentioned this pull request

Apr 29, 2021

@vstinner

I merged my PR #25721 and the flag was renamed. Can you please rebase your PR?

vstinner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. If you rebase your PR and rename Py_TPFLAGS_DISABLE_NEW flag to Py_TPFLAGS_DISALLOW_INSTANTIATION.

I only reviewed Lib/test/test_hashlib.py and Modules/_hashopenssl.c changes.

@vstinner

I created PR #25745 which also updates the posix module.

@tiran

Labels