Bump typing-extensions from 4.11.0 to 4.12.1
Bumps typing-extensions from 4.11.0 to 4.12.1.
Release notes
Sourced from typing-extensions's releases.
4.12.1
- Preliminary changes for compatibility with the draft implementation of PEP 649 in Python 3.14. Patch by Jelle Zijlstra.
- Fix regression in v4.12.0 where nested
Annotated
types would causeTypeError
to be raised if the nestedAnnotated
type had unhashable metadata. Patch by Alex Waygood.4.12.0
This release focuses on compatibility with the upcoming release of Python 3.13. Most changes are related to the implementation of type parameter defaults (PEP 696).
Thanks to all of the people who contributed patches, especially Alex Waygood, who did most of the work adapting typing-extensions to the CPython PEP 696 implementation.
There is a single change since 4.12.0rc1:
- Fix incorrect behaviour of
typing_extensions.ParamSpec
on Python 3.8 and 3.9 that meant thatisinstance(typing_extensions.ParamSpec("P"), typing.TypeVar)
would have a different result in some situations depending on whether or not a profiling function had been set usingsys.setprofile
. Patch by Alex Waygood.Changes included in 4.12.0rc1:
- Improve the implementation of type parameter defaults (PEP 696)
- Backport the
typing.NoDefault
sentinel object from Python 3.13. TypeVars, ParamSpecs and TypeVarTuples without default values now have their__default__
attribute set to this sentinel value.- TypeVars, ParamSpecs and TypeVarTuples now have a
has_default()
method, matchingtyping.TypeVar
,typing.ParamSpec
andtyping.TypeVarTuple
on Python 3.13+.- TypeVars, ParamSpecs and TypeVarTuples with
default=None
passed to their constructors now have their__default__
attribute set toNone
at runtime rather thantypes.NoneType
.- Fix most tests for
TypeVar
,ParamSpec
andTypeVarTuple
on Python 3.13.0b1 and newer.- Backport CPython PR #118774, allowing type parameters without default values to follow those with default values in some type parameter lists. Patch by Alex Waygood, backporting a CPython PR by Jelle Zijlstra.
- It is now disallowed to use a
TypeVar
with a default value after aTypeVarTuple
in a type parameter list. This matches the CPython implementation of PEP 696 on Python 3.13+.- Fix bug in PEP-696 implementation where a default value for a
ParamSpec
would be cast to a tuple if a list was provided. Patch by Alex Waygood.- Fix
Protocol
tests on Python 3.13.0a6 and newer. 3.13.0a6 adds a new__static_attributes__
attribute to all classes in Python,
... (truncated)
Changelog
Sourced from typing-extensions's changelog.
Release 4.12.1 (June 1, 2024)
- Preliminary changes for compatibility with the draft implementation of PEP 649 in Python 3.14. Patch by Jelle Zijlstra.
- Fix regression in v4.12.0 where nested
Annotated
types would causeTypeError
to be raised if the nestedAnnotated
type had unhashable metadata. Patch by Alex Waygood.Release 4.12.0 (May 23, 2024)
This release is mostly the same as 4.12.0rc1 but fixes one more longstanding bug.
- Fix incorrect behaviour of
typing_extensions.ParamSpec
on Python 3.8 and 3.9 that meant thatisinstance(typing_extensions.ParamSpec("P"), typing.TypeVar)
would have a different result in some situations depending on whether or not a profiling function had been set usingsys.setprofile
. Patch by Alex Waygood.Release 4.12.0rc1 (May 16, 2024)
This release focuses on compatibility with the upcoming release of Python 3.13. Most changes are related to the implementation of type parameter defaults (PEP 696).
Thanks to all of the people who contributed patches, especially Alex Waygood, who did most of the work adapting typing-extensions to the CPython PEP 696 implementation.
Full changelog:
- Improve the implementation of type parameter defaults (PEP 696)
- Backport the
typing.NoDefault
sentinel object from Python 3.13. TypeVars, ParamSpecs and TypeVarTuples without default values now have their__default__
attribute set to this sentinel value.- TypeVars, ParamSpecs and TypeVarTuples now have a
has_default()
method, matchingtyping.TypeVar
,typing.ParamSpec
andtyping.TypeVarTuple
on Python 3.13+.- TypeVars, ParamSpecs and TypeVarTuples with
default=None
passed to their constructors now have their__default__
attribute set toNone
at runtime rather thantypes.NoneType
.- Fix most tests for
TypeVar
,ParamSpec
andTypeVarTuple
on Python 3.13.0b1 and newer.- Backport CPython PR #118774, allowing type parameters without default values to follow those with default values in some type parameter lists. Patch by Alex Waygood, backporting a CPython PR by Jelle Zijlstra.
- It is now disallowed to use a
TypeVar
with a default value after aTypeVarTuple
in a type parameter list. This matches the CPython implementation of PEP 696 on Python 3.13+.
... (truncated)
Commits
-
7269638
Prepare release 4.12.1 (#418) -
8dfcf3c
FixTypeError
on nestedAnnotated
types where the inner type has unhashab... -
d76f591
Switch from flake8 to ruff (#414) -
920d60d
Support my PEP 649 branch (#412) -
e792bce
Ignore fewer flake8 rules when linting tests (#413) -
f90a8dc
Prepare release 4.12.0 (#408) -
118e1a6
Make sureisinstance(typing_extensions.ParamSpec("P"), typing.TypeVar)
is u... -
910141a
Add security documentation (#403) -
0dbc7c9
Prepare release 4.12.0rc1 (#402) -
1da5d3d
Update actions/setup-python (#401) - Additional commits viewable in compare view