gh-118418: Deprecate failing to pass a value to the *type_params* parameter of some private typing APIs (#118695)

This commit is contained in:
Alex Waygood 2024-05-07 12:12:28 +01:00 • committed by GitHub
parent 6f768b71ba
commit 0f8a07d158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 11 deletions

View file

@ -0,0 +1,6 @@
A :exc:`DeprecationWarning` is now emitted if you fail to pass a value to
the new *type_params* parameter of ``typing._eval_type()`` or
``typing.ForwardRef._evaluate()``. (Using either of these private and
undocumented functions is discouraged to begin with, but failing to pass a
value to the ``type_params`` parameter may lead to incorrect behaviour on
Python 3.12 or newer.)