File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9599,8 +9599,7 @@ def test_sentinel_deprecated(self):
95999599 class SentinelSubclass (Sentinel ):
96009600 pass
96019601
9602- with self .assertWarnsRegex (DeprecationWarning , r"Sentinel was renamed to typing_extensions.sentinel" ):
9603- my_sentinel = Sentinel (name = "my_sentinel" )
9602+ my_sentinel = Sentinel (name = "my_sentinel" )
96049603 with self .assertWarnsRegex (DeprecationWarning , r"Setting attributes on sentinel is deprecated" ):
96059604 my_sentinel .foo = "bar"
96069605
Original file line number Diff line number Diff line change @@ -446,12 +446,7 @@ def __reduce__(self) -> str:
446446 """Reduce this sentinel to a singleton."""
447447 return self .__name__ # Module is taken from the __module__ attribute
448448
449- with warnings .catch_warnings (): # Allow sentinel subclass for backwards compatibility
450- warnings .simplefilter ("ignore" )
451-
452- @deprecated ("""Sentinel was renamed to typing_extensions.sentinel""" )
453- class Sentinel (sentinel ):
454- pass
449+ Sentinel = sentinel
455450
456451_marker = sentinel ("sentinel" )
457452
You can’t perform that action at this time.
0 commit comments