diff options
author | Brett Cannon <brett@python.org> | 2013-06-16 17:13:40 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-16 17:13:40 (GMT) |
commit | e4f41deccf94ccc798b1eb1f44657ade66669a60 (patch) | |
tree | 8f47ca73224c628f4afcebb9dd989cac73d0f8d1 /Lib/modulefinder.py | |
parent | 39295e7a55d03b9ef31c0d0dd27d129b1ad5a695 (diff) | |
download | cpython-e4f41deccf94ccc798b1eb1f44657ade66669a60.zip cpython-e4f41deccf94ccc798b1eb1f44657ade66669a60.tar.gz cpython-e4f41deccf94ccc798b1eb1f44657ade66669a60.tar.bz2 |
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).
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r-- | Lib/modulefinder.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index 4996d7a..e3ad7d6 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -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')]) |