summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.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/test/test_inspect.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/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index d880e87..0537d7e 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -203,9 +203,9 @@ class TestRetrievingSourceCode(GetSourceBase):
self.assertEqual(inspect.getfile(mod.StupidGit), mod.__file__)
def test_getmodule_recursion(self):
- from new import module
+ from types import ModuleType
name = '__inspect_dummy'
- m = sys.modules[name] = module(name)
+ m = sys.modules[name] = ModuleType(name)
m.__file__ = "<string>" # hopefully not a real filename...
m.__loader__ = "dummy" # pretend the filename is understood by a loader
exec "def x(): pass" in m.__dict__