@@ -730,6 +730,12 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
730
730
the given type. At runtime it simply returns the received value.
731
731
(Contributed by Jelle Zijlstra in :gh: `90638 `.)
732
732
733
+ * :data: `typing.TypedDict ` types can now be generic. (Contributed by
734
+ Samodya Abey in :gh: `89026 `.)
735
+
736
+ * :class: `~typing.NamedTuple ` types can now be generic.
737
+ (Contributed by Serhiy Storchaka in :issue: `43923 `.)
738
+
733
739
* Allow subclassing of :class: `typing.Any `. This is useful for avoiding
734
740
type checker errors related to highly dynamic class, such as mocks.
735
741
(Contributed by Shantanu Jain in :gh: `91154 `.)
@@ -743,11 +749,33 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
743
749
to clear all registered overloads of a function.
744
750
(Contributed by Jelle Zijlstra in :gh: `89263 `.)
745
751
746
- * :data: ` typing.TypedDict ` subclasses can now be generic. (Contributed by
747
- Samodya Abey in :gh: `89026 `.)
752
+ * The :meth: ` __init__ ` method of :class: ` ~typing.Protocol ` subclasses
753
+ is now preserved. (Contributed by Adrian Garcia Badarasco in :gh: `88970 `.)
748
754
749
- * :class: `~typing.NamedTuple ` subclasses can now be generic.
750
- (Contributed by Serhiy Storchaka in :issue: `43923 `.)
755
+ * The representation of empty tuple types (``Tuple[()] ``) is simplified.
756
+ This affects introspection, e.g. ``get_args(Tuple[()]) `` now evaluates
757
+ to ``() `` instead of ``((),) ``.
758
+ (Contributed by Serhiy Storchaka in :gh: `91137 `.)
759
+
760
+ * Loosen runtime requirements for type annotations by removing the callable
761
+ check in the private ``typing._type_check `` function. (Contributed by
762
+ Gregory Beauregard in :gh: `90802 `.)
763
+
764
+ * :func: `typing.get_type_hints ` now supports evaluating strings as forward
765
+ references in :ref: `PEP 585 generic aliases <types-genericalias >`.
766
+ (Contributed by Niklas Rosenstein in :gh: `85542 `.)
767
+
768
+ * :func: `typing.get_type_hints ` no longer adds :data: `~typing.Optional `
769
+ to parameters with ``None `` as a default. (Contributed by Nikita Sobolev
770
+ in :gh: `90353 `.)
771
+
772
+ * :func: `typing.get_type_hints ` now supports evaluating bare stringified
773
+ :data: `~typing.ClassVar ` annotations. (Contributed by Gregory Beauregard
774
+ in :gh: `90711 `.)
775
+
776
+ * :func: `typing.no_type_check ` no longer modifies external classes and functions.
777
+ It also now correctly marks classmethods as not to be type checked. (Contributed
778
+ by Nikita Sobolev in :gh: `90729 `.)
751
779
752
780
753
781
tkinter
@@ -1236,6 +1264,10 @@ Deprecated
1236
1264
wherever possible.
1237
1265
(Contributed by Alex Waygood in :gh: `92332 `.)
1238
1266
1267
+ * The keyword argument syntax for constructing :data: `~typing.TypedDict ` types
1268
+ is now deprecated. Support will be removed in Python 3.13. (Contributed by
1269
+ Jingchen Ye in :gh: `90224 `.)
1270
+
1239
1271
1240
1272
Pending Removal in Python 3.12
1241
1273
==============================
0 commit comments