-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-141226: Deprecate PEP-456 support for embedders #141287
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| #if Py_HASH_ALGORITHM == Py_HASH_EXTERNAL | ||
| extern PyHash_FuncDef PyHash_Func; | ||
| Py_DEPRECATED(3.15) extern PyHash_FuncDef PyHash_Func; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the most portable way of indicating the warning but I'm not entirely sure (it's only used in the getter function some lines below)
|
|
||
| .. include:: c-api-pending-removal-in-3.15.rst | ||
|
|
||
| .. include:: c-api-pending-removal-in-3.16.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot, we'll also need to backport this fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer that I open a separate PR for that? I can definitely do so for miss-ilington.
| * Build: | ||
|
|
||
| * Deprecate :pep:`456` support for providing an external definition | ||
| of the string hashing scheme. Removal is scheduled for Python 3.17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to rush this and not use the preferred five years?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err.. I forgot the 5 years. I did a +2 version but I can definitely do a +5 years. However, note that I couldn't find any (public) code that was using this feature so I guessed we could drop this.
Actually, as I told Victor, the maintenance cost on our side won't change at all because we already have all the infrastructure in place except for actually enabling this feature during the build (but all the code is already there and is straightforward). What is however hard to maintain are the docs for that (it's not easy to explain what needs to be done) and if users use this feature wrongly, it becomes a really bad footgun.
I think "advanced users" (embedders) would rather patch the entire file instead of relying on this as our configure script doesn't even support this...
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm +1 on deprecating this feature. I have no opinion on which release should remove the code.
--with-hash-algorithm#141226📚 Documentation preview 📚: https://cpython-previews--141287.org.readthedocs.build/