File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ - Fix tests on 3.13.0a5. Patch by Jelle Zijlstra.
3
4
- Fix the runtime behavior of type parameters with defaults (PEP 696).
4
5
Patch by Nadir Chowdhury.
5
6
- Fix minor discrepancy between error messages produced by ` typing `
Original file line number Diff line number Diff line change @@ -5531,7 +5531,7 @@ def test_typing_extensions_defers_when_possible(self):
5531
5531
}
5532
5532
if sys .version_info < (3 , 13 ):
5533
5533
exclude |= {'NamedTuple' , 'Protocol' , 'runtime_checkable' }
5534
- if not hasattr ( typing , 'ReadOnly' ) :
5534
+ if not typing_extensions . _PEP_728_IMPLEMENTED :
5535
5535
exclude |= {'TypedDict' , 'is_typeddict' }
5536
5536
for item in typing_extensions .__all__ :
5537
5537
if item not in exclude and hasattr (typing , item ):
Original file line number Diff line number Diff line change @@ -792,7 +792,11 @@ def inner(func):
792
792
return inner
793
793
794
794
795
- if hasattr (typing , "ReadOnly" ):
795
+ # Update this to something like >=3.13.0b1 if and when
796
+ # PEP 728 is implemented in CPython
797
+ _PEP_728_IMPLEMENTED = False
798
+
799
+ if _PEP_728_IMPLEMENTED :
796
800
# The standard library TypedDict in Python 3.8 does not store runtime information
797
801
# about which (if any) keys are optional. See https://bugs.python.org/issue38834
798
802
# The standard library TypedDict in Python 3.9.0/1 does not honour the "total"
@@ -803,7 +807,8 @@ def inner(func):
803
807
# Aaaand on 3.12 we add __orig_bases__ to TypedDict
804
808
# to enable better runtime introspection.
805
809
# On 3.13 we deprecate some odd ways of creating TypedDicts.
806
- # PEP 705 proposes adding the ReadOnly[] qualifier.
810
+ # Also on 3.13, PEP 705 adds the ReadOnly[] qualifier.
811
+ # PEP 728 (still pending) makes more changes.
807
812
TypedDict = typing .TypedDict
808
813
_TypedDictMeta = typing ._TypedDictMeta
809
814
is_typeddict = typing .is_typeddict
You can’t perform that action at this time.
0 commit comments