pypi / typing-extensions
typing-extensions
What changed in typing-extensions 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking5 deprecations7 new APIs and options5 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittyping-extensions 426 changes
Breaking changes 1
Attempting to subclass ParamSpec now raises TypeError on Python 3.9, matching the typing implementation.
Deprecations 5
The public name is now typing_extensions.sentinel; typing_extensions.Sentinel remains as a soft-deprecated compatibility alias.
Arbitrary attribute assignments to sentinels are deprecated.
Passing name as a keyword argument to the sentinel constructor is deprecated.
Passing repr as a positional argument to the sentinel constructor is deprecated.
Subclassing sentinels is deprecated.
New APIs and options 7
The contravariant parameter is officially supported and its runtime validation is improved.
The covariant parameter is officially supported and its runtime validation is improved.
AsyncIterator, io.Reader, io.Writer and os.PathLike protocols can now be used as bases for other protocols.
TypeVarTuple now accepts the bound parameter.
TypeVarTuple now accepts the contravariant parameter.
TypeVarTuple now accepts the covariant parameter.
TypeVarTuple now accepts the infer_variance parameter.
Behavior and default changes 5
The bound parameter is officially supported and its runtime validation is improved.
The infer_variance parameter is officially supported and its runtime validation is improved.
Sentinels can now be pickled.
The default repr of a sentinel created as X = sentinel("X") is now X rather than <X>.
The __module__ attribute is now writable.
Fixes and other changes 8
On Python 3.9 and 3.10, isinstance results no longer vary depending on whether a profiling function is set.
Applying deprecated to a coroutine function on Python 3.14.0 no longer emits a DeprecationWarning.
Behavior is fixed for multiple inheritance involving an @deprecated-decorated base class.
Key setting is fixed when inheriting keys with the same name.
Python 3.15 is now officially supported.
Key setting is fixed when inheriting keys with the same name.
Sentinels now preserve their identity when copied or deep-copied.
On Python 3.9 and 3.10, isinstance results no longer vary depending on whether a profiling function is set.