]> granicus.if.org Git - python/commitdiff
No more deprecation warnings for distutils.sysconfig, following r78666.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sun, 21 Mar 2010 11:50:17 +0000 (11:50 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sun, 21 Mar 2010 11:50:17 +0000 (11:50 +0000)
But when the "dl" module is available, it gives a py3k deprecation warning.

Lib/distutils/tests/test_build_ext.py
Lib/test/test_distutils.py

index 4860c9bf24fdacab7821bb5fdd0dde04bab2cb3c..f97ae1a7be9c9336f9464aac2894a8869309f037 100644 (file)
@@ -358,6 +358,9 @@ class BuildExtTestCase(support.TempdirManager,
         import distutils.core, distutils.extension, distutils.command.build_ext
         saved_ext = distutils.extension.Extension
         try:
+            # on some platforms, it loads the deprecated "dl" module
+            test_support.import_module('setuptools_build_ext', deprecated=True)
+
             # theses import patch Distutils' Extension class
             from setuptools_build_ext import build_ext as setuptools_build_ext
             from setuptools_extension import Extension
index 0a54c5709585d6a71b3ed35ad967723e009e1077..a9cbbb46a037bdbc147e898a0a145669e648ca28 100644 (file)
@@ -5,18 +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.test_support.reap_children()
+    test_support.run_unittest(distutils.tests.test_suite())
+    test_support.reap_children()
 
 
 if __name__ == "__main__":