summaryrefslogtreecommitdiffstats
path: root/Lib/modulefinder.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-27 21:34:01 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-27 21:34:01 (GMT)
commitc756d00cf20ba094a93f09647e80b688ded61bf5 (patch)
treeb9c04d37004dbc6e299afdeeea5cd88d1f1189f9 /Lib/modulefinder.py
parent8b01140d2c0580258281b22a63e13eb43c897827 (diff)
downloadcpython-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/modulefinder.py')
-rw-r--r--Lib/modulefinder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 5390e64..34d15b8 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -7,7 +7,7 @@ import imp
import marshal
import os
import sys
-import new
+import types
import struct
if hasattr(sys.__stdout__, "newlines"):
@@ -594,7 +594,7 @@ class ModuleFinder:
if isinstance(consts[i], type(co)):
consts[i] = self.replace_paths_in_code(consts[i])
- return new.code(co.co_argcount, co.co_nlocals, co.co_stacksize,
+ return types.CodeType(co.co_argcount, co.co_nlocals, co.co_stacksize,
co.co_flags, co.co_code, tuple(consts), co.co_names,
co.co_varnames, new_filename, co.co_name,
co.co_firstlineno, co.co_lnotab,