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

[3.13] Rename typing._collect_parameters (GH-118900) #118917

Merged
merged 1 commit into from
May 10, 2024

Conversation

miss-islington
Copy link
Contributor

Unfortunately, released versions of typing_extensions
monkeypatch this function without the extra parameter, which makes
it so things break badly if current main is used with typing_extensions.

Fortunately, the monkeypatching is not needed on Python 3.13, because CPython
now implements PEP 696. By renaming the function, we prevent the monkeypatch
from breaking typing.py internals.

We keep the old name (raising a DeprecationWarning) to help other external users who call it.
(cherry picked from commit ec9d12b)

Co-authored-by: Jelle Zijlstra [email protected]

Unfortunately, released versions of typing_extensions
monkeypatch this function without the extra parameter, which makes
it so things break badly if current main is used with typing_extensions.

Fortunately, the monkeypatching is not needed on Python 3.13, because CPython
now implements PEP 696. By renaming the function, we prevent the monkeypatch
from breaking typing.py internals.

We keep the old name (raising a DeprecationWarning) to help other external users who call it.
(cherry picked from commit ec9d12b)

Co-authored-by: Jelle Zijlstra <[email protected]>
@AlexWaygood AlexWaygood enabled auto-merge (squash) May 10, 2024 17:02
@AlexWaygood AlexWaygood self-assigned this May 10, 2024
@AlexWaygood AlexWaygood merged commit b3074f0 into python:3.13 May 10, 2024
35 checks passed
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.

3 participants