diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-27 21:34:01 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-27 21:34:01 (GMT) |
commit | c756d00cf20ba094a93f09647e80b688ded61bf5 (patch) | |
tree | b9c04d37004dbc6e299afdeeea5cd88d1f1189f9 /Lib/compiler | |
parent | 8b01140d2c0580258281b22a63e13eb43c897827 (diff) | |
download | cpython-c756d00cf20ba094a93f09647e80b688ded61bf5.zip cpython-c756d00cf20ba094a93f09647e80b688ded61bf5.tar.gz cpython-c756d00cf20ba094a93f09647e80b688ded61bf5.tar.bz2 |
Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/pyassem.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index 82ff396..893fa64 100644 --- a/Lib/compiler/pyassem.py +++ b/Lib/compiler/pyassem.py @@ -1,7 +1,7 @@ """A flow graph representation for Python bytecode""" import dis -import new +import types import sys from compiler import misc @@ -595,7 +595,7 @@ class PyFlowGraph(FlowGraph): argcount = self.argcount if self.flags & CO_VARKEYWORDS: argcount = argcount - 1 - return new.code(argcount, nlocals, self.stacksize, self.flags, + return types.CodeType(argcount, nlocals, self.stacksize, self.flags, self.lnotab.getCode(), self.getConsts(), tuple(self.names), tuple(self.varnames), self.filename, self.name, self.lnotab.firstline, |