mirror of https://github.com/python/cpython
merge
This commit is contained in:
commit
5a948a7eee
|
@ -7,9 +7,14 @@ functionality over this module.
|
||||||
"""
|
"""
|
||||||
# (Probably) need to stay in _imp
|
# (Probably) need to stay in _imp
|
||||||
from _imp import (lock_held, acquire_lock, release_lock,
|
from _imp import (lock_held, acquire_lock, release_lock,
|
||||||
load_dynamic, get_frozen_object, is_frozen_package,
|
get_frozen_object, is_frozen_package,
|
||||||
init_builtin, init_frozen, is_builtin, is_frozen,
|
init_builtin, init_frozen, is_builtin, is_frozen,
|
||||||
_fix_co_filename)
|
_fix_co_filename)
|
||||||
|
try:
|
||||||
|
from _imp import load_dynamic
|
||||||
|
except ImportError:
|
||||||
|
# Platform doesn't support dynamic loading.
|
||||||
|
load_dynamic = None
|
||||||
|
|
||||||
# Directly exposed by this module
|
# Directly exposed by this module
|
||||||
from importlib._bootstrap import new_module
|
from importlib._bootstrap import new_module
|
||||||
|
@ -160,7 +165,7 @@ def load_module(name, file, filename, details):
|
||||||
return load_source(name, filename, file)
|
return load_source(name, filename, file)
|
||||||
elif type_ == PY_COMPILED:
|
elif type_ == PY_COMPILED:
|
||||||
return load_compiled(name, filename, file)
|
return load_compiled(name, filename, file)
|
||||||
elif type_ == C_EXTENSION:
|
elif type_ == C_EXTENSION and load_dynamic is not None:
|
||||||
return load_dynamic(name, filename, file)
|
return load_dynamic(name, filename, file)
|
||||||
elif type_ == PKG_DIRECTORY:
|
elif type_ == PKG_DIRECTORY:
|
||||||
return load_package(name, filename)
|
return load_package(name, filename)
|
||||||
|
|
|
@ -283,6 +283,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
Issue #16880: Do not assume _imp.load_dynamic() is defined in the imp module.
|
||||||
|
|
||||||
- Issue #16389: Fixed a performance regression relative to Python 3.1 in the
|
- Issue #16389: Fixed a performance regression relative to Python 3.1 in the
|
||||||
caching of compiled regular expressions.
|
caching of compiled regular expressions.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue