From 96f14c2f3d3fe9fcd063c8075cdfb2bbd58d855a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2022 10:46:08 -0400 Subject: [PATCH] gh-93963: Remove deprecated names from importlib.abc --- Lib/importlib/abc.py | 15 --------------- .../2022-07-03-10-44-57.gh-issue-93963.cb1oJS.rst | 2 ++ 2 files changed, 2 insertions(+), 15 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-07-03-10-44-57.gh-issue-93963.cb1oJS.rst diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py index 8fa9a0f3bc1e4b..4ddd1329e7eef4 100644 --- a/Lib/importlib/abc.py +++ b/Lib/importlib/abc.py @@ -15,8 +15,6 @@ import abc import warnings -from .resources import abc as _resources_abc - __all__ = [ 'Loader', 'Finder', 'MetaPathFinder', 'PathEntryFinder', @@ -25,19 +23,6 @@ ] -def __getattr__(name): - """ - For backwards compatibility, continue to make names - from _resources_abc available through this module. #93963 - """ - if name in _resources_abc.__all__: - obj = getattr(_resources_abc, name) - warnings._deprecated(f"{__name__}.{name}", remove=(3, 14)) - globals()[name] = obj - return obj - raise AttributeError(f'module {__name__!r} has no attribute {name!r}') - - def _register(abstract_cls, *classes): for cls in classes: abstract_cls.register(cls) diff --git a/Misc/NEWS.d/next/Library/2022-07-03-10-44-57.gh-issue-93963.cb1oJS.rst b/Misc/NEWS.d/next/Library/2022-07-03-10-44-57.gh-issue-93963.cb1oJS.rst new file mode 100644 index 00000000000000..d093c8e35a5994 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-07-03-10-44-57.gh-issue-93963.cb1oJS.rst @@ -0,0 +1,2 @@ +Remove deprecated names from ``importlib.abc`` as found in +``importlib.resources.abc``.