File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ # Unreleased
2+
3+ - Remove ` __or__ ` and ` __ror__ ` methods from ` typing_extensions.Sentinel `
4+ on Python versions <3.10. PEP 604 was introduced in Python 3.10, and
5+ ` typing_extensions ` does not generally attempt to backport PEP-604 methods
6+ to prior versions.
7+
18# Release 4.14.0rc1 (May 24, 2025)
29
310- Drop support for Python 3.8 (including PyPy-3.8). Patch by [ Victorien Plot] ( https://github.com/Viicos ) .
Original file line number Diff line number Diff line change @@ -4244,11 +4244,12 @@ def __repr__(self):
42444244 def __call__ (self , * args , ** kwargs ):
42454245 raise TypeError (f"{ type (self ).__name__ !r} object is not callable" )
42464246
4247- def __or__ (self , other ):
4248- return typing .Union [self , other ]
4247+ if sys .version_info >= (3 , 10 ):
4248+ def __or__ (self , other ):
4249+ return typing .Union [self , other ]
42494250
4250- def __ror__ (self , other ):
4251- return typing .Union [other , self ]
4251+ def __ror__ (self , other ):
4252+ return typing .Union [other , self ]
42524253
42534254 def __getstate__ (self ):
42544255 raise TypeError (f"Cannot pickle { type (self ).__name__ !r} object" )
You can’t perform that action at this time.
0 commit comments