mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3 compatible, there are no plans to remove the module any sooner than Python 4 (unless the community moves to Python 3 solidly before then).
This commit is contained in:
parent
39295e7a55
commit
e4f41deccf
15 changed files with 103 additions and 85 deletions
|
|
@ -1,13 +1,16 @@
|
|||
"""Find modules used by a script, using introspection."""
|
||||
|
||||
import dis
|
||||
import imp
|
||||
import importlib.machinery
|
||||
import marshal
|
||||
import os
|
||||
import sys
|
||||
import types
|
||||
import struct
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', PendingDeprecationWarning)
|
||||
import imp
|
||||
|
||||
# XXX Clean up once str8's cstor matches bytes.
|
||||
LOAD_CONST = bytes([dis.opname.index('LOAD_CONST')])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue