mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
Issue #7092: Fix the DeprecationWarnings emitted by the standard library
when using the -3 flag. Patch by Florent Xicluna.
This commit is contained in:
parent
b9c3ed4f82
commit
b9d4963a98
18 changed files with 99 additions and 88 deletions
|
@ -870,10 +870,10 @@ class CodeGenerator:
|
|||
level = node.level
|
||||
if level == 0 and not self.graph.checkFlag(CO_FUTURE_ABSIMPORT):
|
||||
level = -1
|
||||
fromlist = map(lambda (name, alias): name, node.names)
|
||||
fromlist = tuple(name for (name, alias) in node.names)
|
||||
if VERSION > 1:
|
||||
self.emit('LOAD_CONST', level)
|
||||
self.emit('LOAD_CONST', tuple(fromlist))
|
||||
self.emit('LOAD_CONST', fromlist)
|
||||
self.emit('IMPORT_NAME', node.modname)
|
||||
for name, alias in node.names:
|
||||
if VERSION > 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue