mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #23911: Move path-based bootstrap code to a separate frozen module.
This commit is contained in:
parent
6b4c63dea5
commit
32439d6eb6
27 changed files with 6192 additions and 5712 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Find modules used by a script, using introspection."""
|
||||
|
||||
import dis
|
||||
import importlib._bootstrap
|
||||
import importlib._bootstrap_external
|
||||
import importlib.machinery
|
||||
import marshal
|
||||
import os
|
||||
|
@ -289,7 +289,7 @@ class ModuleFinder:
|
|||
co = compile(fp.read()+'\n', pathname, 'exec')
|
||||
elif type == imp.PY_COMPILED:
|
||||
try:
|
||||
marshal_data = importlib._bootstrap._validate_bytecode_header(fp.read())
|
||||
marshal_data = importlib._bootstrap_external._validate_bytecode_header(fp.read())
|
||||
except ImportError as exc:
|
||||
self.msgout(2, "raise ImportError: " + str(exc), pathname)
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue