diff options
author | shadchin <[email protected]> | 2022-04-18 12:39:32 +0300 |
---|---|---|
committer | shadchin <[email protected]> | 2022-04-18 12:39:32 +0300 |
commit | d4be68e361f4258cf0848fc70018dfe37a2acc24 (patch) | |
tree | 153e294cd97ac8b5d7a989612704a0c1f58e8ad4 /contrib/tools/python3/src/Lib/runpy.py | |
parent | 260c02f5ccf242d9d9b8a873afaf6588c00237d6 (diff) |
IGNIETFERRO-1816 Update Python 3 from 3.9.12 to 3.10.4
ref:9f96be6d02ee8044fdd6f124b799b270c20ce641
Diffstat (limited to 'contrib/tools/python3/src/Lib/runpy.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/runpy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/tools/python3/src/Lib/runpy.py b/contrib/tools/python3/src/Lib/runpy.py index 7e1e1ac5dde..caba1214262 100644 --- a/contrib/tools/python3/src/Lib/runpy.py +++ b/contrib/tools/python3/src/Lib/runpy.py @@ -16,7 +16,6 @@ import importlib.util import io import types import os -from pkgutil import read_code, get_importer __all__ = [ "run_module", "run_path", @@ -233,6 +232,7 @@ def _get_main_module_details(error=ImportError): def _get_code_from_file(run_name, fname): # Check for a compiled file first + from pkgutil import read_code decoded_path = os.path.abspath(os.fsdecode(fname)) with io.open_code(decoded_path) as f: code = read_code(f) @@ -255,6 +255,7 @@ def run_path(path_name, init_globals=None, run_name=None): if run_name is None: run_name = "<run_path>" pkg_name = run_name.rpartition(".")[0] + from pkgutil import get_importer importer = get_importer(path_name) # Trying to avoid importing imp so as to not consume the deprecation warning. is_NullImporter = False |