]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Rename typing._collect_parameters (#118900)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Fri, 10 May 2024 16:55:49 +0000 (09:55 -0700)
committerGitHub <noreply@github.com>
Fri, 10 May 2024 16:55:49 +0000 (16:55 +0000)
commitec9d12be9648ee60a2eb02d67069d74f8b314df9
tree7caaf3cc493ede55fd1388f11b7a6fb068c3be6c
parentf5c6b9977a561fcf9c2a803fb08652fd39b13d3b
Rename typing._collect_parameters (#118900)

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.
Lib/test/test_typing.py
Lib/typing.py