Skip to content

Commit 5b8cd5a

Browse files
authored
gh-104415: Fix refleak tests for typing.ByteString deprecation (#104416)
1 parent d50c37d commit 5b8cd5a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/typing.py

+9
Original file line numberDiff line numberDiff line change
@@ -3586,3 +3586,12 @@ def __getattr__(attr):
35863586
)
35873587
return ByteString
35883588
raise AttributeError(f"module 'typing' has no attribute {attr!r}")
3589+
3590+
3591+
def _remove_cached_ByteString_from_globals():
3592+
try:
3593+
del globals()["ByteString"]
3594+
except KeyError:
3595+
pass
3596+
3597+
_cleanups.append(_remove_cached_ByteString_from_globals)

0 commit comments

Comments
 (0)