Skip to content

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented May 7, 2024

These are undocumented, private functions, but there's unfortunately widespread usage of them in third-party libraries. Even if we provide a new public API for people to use in Python 3.14, it will take a while for third-party libraries to migrate to the new API. In the meantime, they may get incorrect behaviour if they fail to pass in a value to the type_params parameter. So let's warn them about that.

Closes #118418

@AlexWaygood AlexWaygood enabled auto-merge (squash) May 7, 2024 10:56
@AlexWaygood
Copy link
Member Author

Thanks both for the reviews!

@AlexWaygood AlexWaygood merged commit 0f8a07d into python:main May 7, 2024
@AlexWaygood AlexWaygood deleted the type-params-depr branch May 7, 2024 11:12
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
@alexmojaki
Copy link

Should this be backported to 3.12?

@JelleZijlstra
Copy link
Member

No, we don't backport deprecations.

@AlexWaygood
Copy link
Member Author

Should this be backported to 3.12?

No, we shouldn't introduce new deprecation warnings in patch releases. Lots of projects use -Werror in CI; adding a deprecation warning in a patch release would mean their tests might suddenly start failing when they upgraded to the latest version of Python 3.12. That would be a really bad outcome.

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.

TypeError: _eval_type() missing 1 required positional argument: 'type_params' with import module

5 participants