]> granicus.if.org Git - python/commitdiff
Added a deprecation warning to the 'new' module.
authorChristian Heimes <christian@cheimes.de>
Tue, 27 Nov 2007 21:35:44 +0000 (21:35 +0000)
committerChristian Heimes <christian@cheimes.de>
Tue, 27 Nov 2007 21:35:44 +0000 (21:35 +0000)
Lib/new.py

index 99a1c3fdc81908c70fb01bb1f9bcf864f4ea461b..a3298b67ad5255c39ec43db3dfaf75ab34f01528 100644 (file)
@@ -3,6 +3,9 @@
 This module is no longer required except for backward compatibility.
 Objects of most types can now be created by calling the type object.
 """
+from warnings import warn as _warn
+_warn("The 'new' module is not supported in 3.x, use the 'types' module "
+    "instead.", DeprecationWarning, 2)
 
 from types import ClassType as classobj
 from types import FunctionType as function