mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #17177: Stop using imp in zipfile
This commit is contained in:
parent
9529fbfd36
commit
b57a085c74
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
import io
|
||||
import os
|
||||
import sys
|
||||
import imp
|
||||
import importlib.util
|
||||
import time
|
||||
import shutil
|
||||
import struct
|
||||
|
@ -869,7 +869,7 @@ class PyZipFileTests(unittest.TestCase):
|
|||
if os.altsep is not None:
|
||||
path_split.extend(fn.split(os.altsep))
|
||||
if '__pycache__' in path_split:
|
||||
fn = imp.source_from_cache(fn)
|
||||
fn = importlib.util.source_from_cache(fn)
|
||||
else:
|
||||
fn = fn[:-1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue