diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-20 19:35:06 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-20 19:35:06 (GMT) |
commit | ab0ac27d24076a2a09e3d8de97055a2fc978709f (patch) | |
tree | b0d5a4be76eb6122b30ebbdd801c7f82bddec8b3 /Lib/modulefinder.py | |
parent | 679688e70d29fad62bb7a07e682ef6966c489445 (diff) | |
parent | 7e52705ee362001a8761461e9c4d49e3873568e0 (diff) | |
download | cpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.zip cpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.tar.gz cpython-ab0ac27d24076a2a09e3d8de97055a2fc978709f.tar.bz2 |
Issue #20315: Removed support for backward compatibility with early 2.x versions.
Removed backward compatibility alias curses.window.nooutrefresh which should
be removed in 2.3.
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r-- | Lib/modulefinder.py | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index ebd068a..b19941e 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -335,30 +335,6 @@ class ModuleFinder: fullname = name + "." + sub self._add_badmodule(fullname, caller) - def scan_opcodes(self, co, - unpack = struct.unpack): - # Scan the code, and yield 'interesting' opcode combinations - # Version for Python 2.4 and older - code = co.co_code - names = co.co_names - consts = co.co_consts - while code: - c = code[0] - if c in STORE_OPS: - oparg, = unpack('<H', code[1:3]) - yield "store", (names[oparg],) - code = code[3:] - continue - if c == LOAD_CONST and code[3] == IMPORT_NAME: - oparg_1, oparg_2 = unpack('<xHxH', code[:6]) - yield "import", (consts[oparg_1], names[oparg_2]) - code = code[6:] - continue - if c >= HAVE_ARGUMENT: - code = code[3:] - else: - code = code[1:] - def scan_opcodes_25(self, co, unpack = struct.unpack): # Scan the code, and yield 'interesting' opcode combinations @@ -390,10 +366,7 @@ class ModuleFinder: def scan_code(self, co, m): code = co.co_code - if sys.version_info >= (2, 5): - scanner = self.scan_opcodes_25 - else: - scanner = self.scan_opcodes + scanner = self.scan_opcodes_25 for what, args in scanner(co): if what == "store": name, = args |