Skip to content

Commit

Permalink
gh-104415: Fix refleak tests for typing.ByteString deprecation (#10…
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored May 12, 2023
1 parent d50c37d commit 5b8cd5a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 5b8cd5a

Please sign in to comment.