gh-91896: Revert some very noisy DeprecationWarnings for ByteString (#104424)

This commit is contained in:
Alex Waygood 2023-05-13 09:55:35 +01:00 committed by GitHub
parent 1be80ed107
commit c527eb1c2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 79 deletions

View file

@ -1,12 +1,3 @@
from _collections_abc import *
from _collections_abc import __all__
from _collections_abc import _CallableGenericAlias
_deprecated_ByteString = globals().pop("ByteString")
def __getattr__(attr):
if attr == "ByteString":
import warnings
warnings._deprecated("collections.abc.ByteString", remove=(3, 14))
return _deprecated_ByteString
raise AttributeError(f"module 'collections.abc' has no attribute {attr!r}")