Kaydet (Commit) 3f5d1463 authored tarafından Florent Xicluna's avatar Florent Xicluna

No more deprecation warnings for distutils.sysconfig, following r78666.

But when the "dl" module is available, it gives a py3k deprecation warning.
üst af61719e
...@@ -358,6 +358,9 @@ class BuildExtTestCase(support.TempdirManager, ...@@ -358,6 +358,9 @@ class BuildExtTestCase(support.TempdirManager,
import distutils.core, distutils.extension, distutils.command.build_ext import distutils.core, distutils.extension, distutils.command.build_ext
saved_ext = distutils.extension.Extension saved_ext = distutils.extension.Extension
try: 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 # theses import patch Distutils' Extension class
from setuptools_build_ext import build_ext as setuptools_build_ext from setuptools_build_ext import build_ext as setuptools_build_ext
from setuptools_extension import Extension from setuptools_extension import Extension
......
...@@ -5,18 +5,13 @@ the test_suite() function there returns a test suite that's ready to ...@@ -5,18 +5,13 @@ the test_suite() function there returns a test suite that's ready to
be run. be run.
""" """
from test import test_support
import distutils.tests import distutils.tests
import test.test_support
import warnings
def test_main(): def test_main():
with warnings.catch_warnings(): test_support.run_unittest(distutils.tests.test_suite())
warnings.filterwarnings("ignore", test_support.reap_children()
"distutils.sysconfig.\w+ is deprecated",
DeprecationWarning)
test.test_support.run_unittest(distutils.tests.test_suite())
test.test_support.reap_children()
if __name__ == "__main__": if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment