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 @@ -232,12 +232,7 @@ def __reduce__(self) -> str:
232232 """Reduce this sentinel to a singleton."""
233233 return self .__name__ # Module is taken from the __module__ attribute
234234
235- with warnings .catch_warnings (): # Allow sentinel subclass for backwards compatibility
236- warnings .simplefilter ("ignore" )
237-
238- @deprecated ("""Sentinel was renamed to typing_extensions.sentinel""" )
239- class Sentinel (sentinel ):
240- pass
235+ Sentinel = sentinel
241236
242237_marker = sentinel ("sentinel" )
243238
You can’t perform that action at this time.
0 commit comments