]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 79191 via svnmerge from
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 07:51:50 +0000 (07:51 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 07:51:50 +0000 (07:51 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79191 | florent.xicluna | 2010-03-21 13:50:17 +0200 (Sun, 21 Mar 2010) | 3 lines

  No more deprecation warnings for distutils.sysconfig, following r78666.
  But when the "dl" module is available, it gives a py3k deprecation warning.
........

Lib/distutils/archive_util.py
Lib/distutils/command/build_py.py
Lib/distutils/dir_util.py
Lib/distutils/filelist.py
Lib/distutils/tests/test_build_ext.py
Lib/test/test_distutils.py

index 251c0df4e98763e040811589e8979a2a27288717..782d4ef96cb2669ad0170a777358a41462e47616 100644 (file)
@@ -160,7 +160,7 @@ def make_archive (base_name, format,
     func = format_info[0]
     for (arg,val) in format_info[1]:
         kwargs[arg] = val
-    filename = apply(func, (base_name, base_dir), kwargs)
+    filename = func(base_name, base_dir, **kwargs)
 
     try:
         filename = func(base_name, base_dir, **kwargs)
index 708ef0f38fc5516dc116aa6a575ce1cd4e62963d..9f8a759a74f66870cf65c122493519e72ce20499 100644 (file)
@@ -157,7 +157,7 @@ class build_py (Command):
 
         if not self.package_dir:
             if path:
-                return apply(os.path.join, path)
+                return os.path.join(*path)
             else:
                 return ''
         else:
@@ -184,7 +184,7 @@ class build_py (Command):
                     tail.insert(0, pdir)
 
                 if tail:
-                    return apply(os.path.join, tail)
+                    return os.path.join(*tail)
                 else:
                     return ''
 
index 77f253255fc7223cb6757301faa8bca7f900824e..92f49346f76f5b1d1b71f6172be7d819be868213 100644 (file)
@@ -204,7 +204,7 @@ def remove_tree (directory, verbose=0, dry_run=0):
     _build_cmdtuple(directory, cmdtuples)
     for cmd in cmdtuples:
         try:
-            apply(cmd[0], (cmd[1],))
+            cmd[0](cmd[1])
             # remove dir from cache if it's already there
             abspath = os.path.abspath(cmd[1])
             if abspath in _path_created:
index 88b33c7c94cbf8e1d49d08961fd9f3ce3cfc6947..4448d5c5a070a1177e905e61157925717695e89e 100644 (file)
@@ -68,7 +68,7 @@ class FileList:
         sortable_files.sort()
         self.files = []
         for sort_tuple in sortable_files:
-            self.files.append(apply(os.path.join, sort_tuple))
+            self.files.append(os.path.join(*sort_tuple))
 
 
     # -- Other miscellaneous utility methods ---------------------------
index 5ecfe15bffb93a6855840e374de97cb1d420f181..1ed9d04b99748b8449e7dae6539582a81033b603 100644 (file)
@@ -349,6 +349,11 @@ class BuildExtTestCase(support.TempdirManager,
         self.assertEquals(wanted, path)
 
     def test_setuptools_compat(self):
+        try:
+            # on some platforms, it loads the deprecated "dl" module
+            test_support.import_module('setuptools_build_ext', deprecated=True)
+        except test_support.TestSkipped:
+            return
         from setuptools_build_ext import build_ext as setuptools_build_ext
         from setuptools_extension import Extension
 
index bf5a80d9b37b1102be3db1d4568b64010f1aa068..a9cbbb46a037bdbc147e898a0a145669e648ca28 100644 (file)
@@ -5,17 +5,13 @@ the test_suite() function there returns a test suite that's ready to
 be run.
 """
 
+from test import test_support
 import distutils.tests
-import test.test_support
-import warnings
 
 
 def test_main():
-    with warnings.catch_warnings():
-        warnings.filterwarnings("ignore",
-                                "distutils.sysconfig.\w+ is deprecated",
-                                DeprecationWarning)
-        test.test_support.run_unittest(distutils.tests.test_suite())
+    test_support.run_unittest(distutils.tests.test_suite())
+    test_support.reap_children()
 
 
 if __name__ == "__main__":