Skip to content

gh-132798: Schedule removal of PyUnicode_AsDecoded/Encoded functions for 3.15 #132799

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 5 commits into from
Apr 25, 2025

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Apr 22, 2025

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

These functions are in the limited API. I'm not sure what the procedure is for removing them, but they can't just disappear from the ABI. I think the practice is to remove them from headers when the limited API isn't used. We should probably make note of that somewhere.

@vstinner
Copy link
Member

These functions are in the limited API. I'm not sure what the procedure is for removing them

Mark them as abi_only in Misc/stable_abi.toml, keep their implementation, and use PyAPI_FUNC() in the C file.

See PyUnicode_GetSize() for an existing example.

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.

LGTM

@StanFromIreland
Copy link
Contributor Author

Anything else left to do @vstinner ?

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

@vstinner vstinner merged commit f6fb498 into python:main Apr 25, 2025
42 checks passed
@StanFromIreland StanFromIreland deleted the removal-schedule branch April 25, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants