mirror of https://github.com/python/cpython
gh-104415: Fix refleak tests for `typing.ByteString` deprecation (#104416)
This commit is contained in:
parent
d50c37d8ad
commit
5b8cd5abe5
|
@ -3586,3 +3586,12 @@ def __getattr__(attr):
|
|||
)
|
||||
return ByteString
|
||||
raise AttributeError(f"module 'typing' has no attribute {attr!r}")
|
||||
|
||||
|
||||
def _remove_cached_ByteString_from_globals():
|
||||
try:
|
||||
del globals()["ByteString"]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
_cleanups.append(_remove_cached_ByteString_from_globals)
|
||||
|
|
Loading…
Reference in New Issue