Skip to content
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

Deprecate functions from PEP 623 #1370

Merged
merged 1 commit into from Jan 10, 2021
Merged

Deprecate functions from PEP 623 #1370

merged 1 commit into from Jan 10, 2021

Conversation

konstin
Copy link
Member

@konstin konstin commented Jan 8, 2021

I think those are all the remaining functions scheduled for removal by PEP 623

@davidhewitt
Copy link
Member

I think we should maybe use #[deprecated] to match Python? Just in case some user wants to use these apis.

@kngwyu
Copy link
Member

kngwyu commented Jan 8, 2021

I think #[cfg_attr(Py_3_9, deprecated)] or just #[cfg(not(Py_3_9))] is sufficient.

@konstin
Copy link
Member Author

konstin commented Jan 8, 2021

I've deprecated them unconditionally and cfg'ed them out with a (not yet existing) Py_3_12, as they'd only cause linker errors on those platforms anyway.

@konstin konstin changed the title Remove functions from PEP 623 Deprecate functions from PEP 623 Jan 8, 2021
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

In the other deprecations in this patch release we're using #[cfg_attr(Py_3_9, deprecated)].

I think I'm ok with just straight-up #[deprecated] on these APIs, because they're intended for removal with no replacement. Many of the deprecated methods only have their replacement added on the same Python version.

CHANGELOG.md Outdated Show resolved Hide resolved
@konstin
Copy link
Member Author

konstin commented Jan 9, 2021

I think I'm ok with just straight-up #[deprecated] on these APIs, because they're intended for removal with no replacement. Many of the deprecated methods only have their replacement added on the same Python version.

Yep, as I understood https://docs.python.org/3/c-api/unicode.html and PEP 623 those methods were legacy for some time already:

PEP 393 was implemented in Python 3.3 which is released in 2012. Old APIs were deprecated since then, and the removal was scheduled in Python 4.0.

Python 4.0 was expected as next version of Python 3.9 when PEP 393 was accepted. But the next version of Python 3.9 is Python 3.10, not 4.0. This is why this PEP schedule the removal plan again.

@davidhewitt
Copy link
Member

To get the release moving I'm going to force-push a fix for the commit and merge this. Thanks very much!

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.

None yet

3 participants