mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
f4dc9204cc
commit
ac9f2f3de3
13 changed files with 3700 additions and 3688 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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue