summaryrefslogtreecommitdiffstats
path: root/Lib/imp.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-08-10 17:47:54 (GMT)
committerBrett Cannon <brett@python.org>2012-08-10 17:47:54 (GMT)
commitac9f2f3de31787a016a1220b304db388dc1705e9 (patch)
tree781ab74268b6ca9c6ab18ec71d0c1b0aa7a6d9c9 /Lib/imp.py
parentf4dc9204cc406ab41c2d643c1a64375a6a2954e5 (diff)
downloadcpython-ac9f2f3de31787a016a1220b304db388dc1705e9.zip
cpython-ac9f2f3de31787a016a1220b304db388dc1705e9.tar.gz
cpython-ac9f2f3de31787a016a1220b304db388dc1705e9.tar.bz2
Issue #15576: Allow extension modules to be a package's __init__
module again. Also took the opportunity to stop accidentally exporting _imp.extension_suffixes() as public.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r--Lib/imp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index 419f631..80b04c8 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -9,7 +9,7 @@ functionality over this module.
from _imp import (lock_held, acquire_lock, release_lock,
load_dynamic, get_frozen_object, is_frozen_package,
init_builtin, init_frozen, is_builtin, is_frozen,
- _fix_co_filename, extension_suffixes)
+ _fix_co_filename)
# Directly exposed by this module
from importlib._bootstrap import new_module
@@ -51,7 +51,7 @@ def get_suffixes():
warnings.warn('imp.get_suffixes() is deprecated; use the constants '
'defined on importlib.machinery instead',
DeprecationWarning, 2)
- extensions = [(s, 'rb', C_EXTENSION) for s in extension_suffixes()]
+ extensions = [(s, 'rb', C_EXTENSION) for s in machinery.EXTENSION_SUFFIXES]
source = [(s, 'U', PY_SOURCE) for s in machinery.SOURCE_SUFFIXES]
bytecode = [(s, 'rb', PY_COMPILED) for s in machinery.BYTECODE_SUFFIXES]