diff options
author | Brett Cannon <brett@python.org> | 2012-08-10 17:47:54 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-08-10 17:47:54 (GMT) |
commit | ac9f2f3de31787a016a1220b304db388dc1705e9 (patch) | |
tree | 781ab74268b6ca9c6ab18ec71d0c1b0aa7a6d9c9 /Lib/imp.py | |
parent | f4dc9204cc406ab41c2d643c1a64375a6a2954e5 (diff) | |
download | cpython-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.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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] |