summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/util.py')
-rw-r--r--Lib/importlib/util.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index 8623c89..7f15b02 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -141,26 +141,6 @@ def _module_to_load(name):
module.__initializing__ = False
-def set_package(fxn):
- """Set __package__ on the returned module.
-
- This function is deprecated.
-
- """
- @functools.wraps(fxn)
- def set_package_wrapper(*args, **kwargs):
- warnings.warn('The import system now takes care of this automatically; '
- 'this decorator is slated for removal in Python 3.12',
- DeprecationWarning, stacklevel=2)
- module = fxn(*args, **kwargs)
- if getattr(module, '__package__', None) is None:
- module.__package__ = module.__name__
- if not hasattr(module, '__path__'):
- module.__package__ = module.__package__.rpartition('.')[0]
- return module
- return set_package_wrapper
-
-
def set_loader(fxn):
"""Set __loader__ on the returned module.