mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-104415: Fix refleak tests for typing.ByteString
deprecation (#104416)
This commit is contained in:
parent
d50c37d8ad
commit
5b8cd5abe5
1 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue