diff options
author | Brett Cannon <brett@python.org> | 2013-06-15 21:32:30 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-15 21:32:30 (GMT) |
commit | b57a085c74291066a70e3d4a591cba34c068e785 (patch) | |
tree | 4400b6801482b0dfbe89966dffd53b4e1f277cf6 /Lib/zipfile.py | |
parent | 9529fbfd363959ee4e33baeebcc6c3bc0252b42c (diff) | |
download | cpython-b57a085c74291066a70e3d4a591cba34c068e785.zip cpython-b57a085c74291066a70e3d4a591cba34c068e785.tar.gz cpython-b57a085c74291066a70e3d4a591cba34c068e785.tar.bz2 |
Issue #17177: Stop using imp in zipfile
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index adaffe1..4099930 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -6,7 +6,7 @@ XXX references to utf-8 need further investigation. import io import os import re -import imp +import importlib.util import sys import time import stat @@ -1645,8 +1645,8 @@ class PyZipFile(ZipFile): file_py = pathname + ".py" file_pyc = pathname + ".pyc" file_pyo = pathname + ".pyo" - pycache_pyc = imp.cache_from_source(file_py, True) - pycache_pyo = imp.cache_from_source(file_py, False) + pycache_pyc = importlib.util.cache_from_source(file_py, True) + pycache_pyo = importlib.util.cache_from_source(file_py, False) if self._optimize == -1: # legacy mode: use whatever file is present if (os.path.isfile(file_pyo) and |