@@ -267,9 +267,9 @@ Python version in which each feature was added to :py:mod:`typing` and the
267267 - 3.11
268268 - 4.0.0
269269 - :pep: `673 `
270- * - :class: `Sentinel `
271- - 3.14
272- - 4.14.0
270+ * - :class: `sentinel `
271+ - 3.15
272+ - 4.14.0 (originally under the name ` Sentinel `)
273273 - :pep: `661 `
274274 * - :class: `TypeAliasType `
275275 - 3.12
@@ -453,13 +453,13 @@ Special typing primitives
453453
454454 .. versionadded :: 4.0.0
455455
456- .. class :: ParamSpec(name, *, default=NoDefault)
456+ .. class :: ParamSpec(name, *, bound=None, covariant=False,
457+ contravariant=False, infer_variance=False, default=NoDefault)
457458
458459 See :py:class: `typing.ParamSpec ` and :pep: `612 `. In ``typing `` since 3.10.
459460
460461 The ``typing_extensions `` version adds support for the
461- ``default= `` argument from :pep: `696 `, and for the ``infer_variance= ``,
462- ``covariant= `` and ``contravariant= `` arguments that were added in Python 3.15.
462+ ``default= `` argument from :pep: `696 `.
463463
464464 On older Python versions, ``typing_extensions.ParamSpec `` may not work
465465 correctly with introspection tools like :func: `get_args ` and
@@ -495,7 +495,8 @@ Special typing primitives
495495
496496 .. versionchanged :: 4.16.0
497497
498- The ``infer_variance ``, ``covariant ``, and ``contravariant `` arguments are now supported.
498+ The ``infer_variance ``, ``covariant ``, and ``contravariant `` arguments are now
499+ officially supported and their validation is improved.
499500
500501.. class :: ParamSpecArgs
501502 ParamSpecKwargs
@@ -719,13 +720,14 @@ Special typing primitives
719720 TypeVars now have a ``has_default() `` method, for compatibility
720721 with :py:class: `typing.TypeVar ` on Python 3.13+.
721722
722- .. class :: TypeVarTuple(name, *, default=NoDefault)
723+ .. class :: TypeVarTuple(name, *, bound=None, covariant=False,
724+ contravariant=False, infer_variance=False, default=NoDefault)
723725
724726 See :py:class: `typing.TypeVarTuple ` and :pep: `646 `. In ``typing `` since 3.11.
725727
726- The ``typing_extensions `` version adds support for the
727- `` default= `` argument from :pep: `696 `, and for the ``infer_variance= ``,
728- `` covariant= `` and ``contravariant= `` arguments that were added in Python 3.15.
728+ The ``typing_extensions `` version adds support for the `` default= `` argument
729+ from :pep: `696 `, and for the ``bound= ``, `` infer_variance= ``, `` covariant= ``
730+ and ``contravariant= `` arguments that were added in Python 3.15.
729731
730732 .. versionadded :: 4.1.0
731733
@@ -759,7 +761,8 @@ Special typing primitives
759761
760762 .. versionchanged :: 4.16.0
761763
762- The ``infer_variance ``, ``covariant ``, and ``contravariant `` arguments are now supported.
764+ The ``bound ``, ``infer_variance ``, ``covariant ``, and ``contravariant ``
765+ arguments are now supported.
763766
764767.. data :: Unpack
765768
@@ -1288,14 +1291,18 @@ Sentinel objects
12881291 .. versionchanged :: 4.16.0
12891292
12901293 The implementation of this class has been updated to conform to
1291- the accepted version of :pep: `661 `.
1292-
1293- Now supports pickle and will be reduced as a singleton.
1294- Renamed from `Sentinel ` to `sentinel `, `Sentinel ` is deprecated.
1295- Automatic `repr ` string no longer has angle brackets.
1296- `repr ` as a positional argument is deprecated.
1297- `name ` as a keyword is deprecated.
1298- Subclassing and attribute assignment are deprecated.
1294+ the accepted version of :pep: `661 `:
1295+
1296+ - Sentinels can now be pickled. They are reduced as singletons, which
1297+ means that they also preserve their identity when copied or deep-copied.
1298+ - `Sentinel ` has been renamed to `sentinel `. `Sentinel ` is retained as a
1299+ soft-deprecated alias, for backwards compatibility.
1300+ - The default repr of a sentinel `X = sentinel("X") ` is now `X `, rather
1301+ than `<X> `.
1302+ - Passing `repr ` as a positional argument to the constructor is deprecated.
1303+ - Passing `name ` as a keyword argument to the constructor is deprecated.
1304+ - Subclassing `sentinel ` is deprecated.
1305+ - Assigning arbitrary attributes to a sentinel is deprecated.
12991306
13001307
13011308Pure aliases
0 commit comments