summaryrefslogtreecommitdiff
path: root/Lib/modulefinder.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:25:52 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:25:52 +0200
commit3f19a274c28567afb39ba46ea8a2ebdeab816b0b (patch)
treeb455925dd27f3d6e421d9fca9f3295b988a24254 /Lib/modulefinder.py
parentb0cbde5d42f12b3aca11b87c017b3c60a26be4fd (diff)
parentc8486579312320fd09c56ce9fce3da7ea0ffd132 (diff)
downloadcpython-3f19a274c28567afb39ba46ea8a2ebdeab816b0b.tar.gz
Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro if
Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r--Lib/modulefinder.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 8103502404..e220315253 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -10,7 +10,7 @@ import types
import struct
import warnings
with warnings.catch_warnings():
- warnings.simplefilter('ignore', PendingDeprecationWarning)
+ warnings.simplefilter('ignore', DeprecationWarning)
import imp
LOAD_CONST = dis.opmap['LOAD_CONST']
@@ -336,8 +336,7 @@ class ModuleFinder:
fullname = name + "." + sub
self._add_badmodule(fullname, caller)
- def scan_opcodes_25(self, co,
- unpack = struct.unpack):
+ def scan_opcodes(self, co):
# Scan the code, and yield 'interesting' opcode combinations
code = co.co_code
names = co.co_names
@@ -360,7 +359,7 @@ class ModuleFinder:
def scan_code(self, co, m):
code = co.co_code
- scanner = self.scan_opcodes_25
+ scanner = self.scan_opcodes
for what, args in scanner(co):
if what == "store":
name, = args