Skip to content

gh-141226: Deprecate PEP-456 support for embedders#141287

Open
picnixz wants to merge 5 commits intopython:mainfrom
picnixz:feat/deprecate/external-141226
Open

gh-141226: Deprecate PEP-456 support for embedders#141287
picnixz wants to merge 5 commits intopython:mainfrom
picnixz:feat/deprecate/external-141226

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Nov 9, 2025


.. include:: c-api-pending-removal-in-3.15.rst

.. include:: c-api-pending-removal-in-3.16.rst
Copy link
Member

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.

Copy link
Member Author

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.
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to push the deprecation to 3.19. That way, if people are actually using that feature by directly passing the CFLAG and manually link their own definition, we have time to add the correct configure support instead.

Copy link
Member

@vstinner vstinner left a 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.

@picnixz picnixz marked this pull request as draft February 7, 2026 11:36
@picnixz picnixz marked this pull request as ready for review February 7, 2026 11:42
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.

4 participants