Merged revisions 59193-59201 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59195 | facundo.batista | 2007-11-27 19:50:12 +0100 (Tue, 27 Nov 2007) | 4 lines


  Moved the errno import from inside the functions to the
  module level.  Fixes issue 1755179.
........
  r59199 | christian.heimes | 2007-11-27 22:28:40 +0100 (Tue, 27 Nov 2007) | 1 line

  Backport of changes to PCbuild9 from the py3k branch
........
  r59200 | christian.heimes | 2007-11-27 22:34:01 +0100 (Tue, 27 Nov 2007) | 1 line

  Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.
........
  r59201 | christian.heimes | 2007-11-27 22:35:44 +0100 (Tue, 27 Nov 2007) | 1 line

  Added a deprecation warning to the 'new' module.
........
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 02034b4..6ebfb69 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -448,8 +448,8 @@
 functions, classes, and the `__test__` dictionary, if it exists:
 
     >>> # A module
-    >>> import new
-    >>> m = new.module('some_module')
+    >>> import types
+    >>> m = types.ModuleType('some_module')
     >>> def triple(val):
     ...     '''
     ...     >>> print(triple(11))
@@ -1941,11 +1941,11 @@
        If DocFileSuite is used from an interactive session, then files
        are resolved relative to the directory of sys.argv[0]:
 
-         >>> import new, os.path, test.test_doctest
+         >>> import types, os.path, test.test_doctest
          >>> save_argv = sys.argv
          >>> sys.argv = [test.test_doctest.__file__]
          >>> suite = doctest.DocFileSuite('test_doctest.txt',
-         ...                              package=new.module('__main__'))
+         ...                              package=types.ModuleType('__main__'))
          >>> sys.argv = save_argv
 
        By setting `module_relative=False`, os-specific paths may be
@@ -2370,9 +2370,9 @@
 """
 
 def old_test4(): """
-        >>> import new
-        >>> m1 = new.module('_m1')
-        >>> m2 = new.module('_m2')
+        >>> import types
+        >>> m1 = types.ModuleType('_m1')
+        >>> m2 = types.ModuleType('_m2')
         >>> test_data = \"""
         ... def _f():
         ...     '''>>> assert 1 == 1