]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add alias to restore 2.7.2 compatibility for setup scripts (#13994).
authorÉric Araujo <merwok@netwok.org>
Sun, 3 Feb 2013 16:41:19 +0000 (11:41 -0500)
committerÉric Araujo <merwok@netwok.org>
Sun, 3 Feb 2013 16:41:19 +0000 (11:41 -0500)
The customize_compiler function moved many times during the 2.7 series;
in 2.7.3, setup scripts importing this function from ccompiler were
broken.  This commit restores compatibility without reintroducing the
issue that #13994 originally fixed (duplication of the function).

A unit test makes little sense here, as distutils tests never do imports
in functions, and the fix is very simple.

Lib/distutils/ccompiler.py
Misc/NEWS

index 7076b933946121d6a842dd8ec00c68d3117b858e..4907a0aa5adc012b20351194bc045e8b627f3d55 100644 (file)
@@ -17,6 +17,8 @@ from distutils.dir_util import mkpath
 from distutils.dep_util import newer_group
 from distutils.util import split_quoted, execute
 from distutils import log
+# following import is for backward compatibility
+from distutils.sysconfig import customize_compiler
 
 class CCompiler:
     """Abstract base class to define the interface that must be implemented
index 0fe7c9a017df7a2038ebf6c72dede0eccb8bd996..1a91e8fca7207b888c281a9907d5d8a9f1611e27 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -203,6 +203,9 @@ Library
   stream or a decoder produces data of an unexpected type (i.e. when
   io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
 
+- Issue #13994: Add compatibility alias in distutils.ccompiler for
+  distutils.sysconfig.customize_compiler.
+
 - Issue #15633: httplib.HTTPResponse is now mark closed when the server
   sends less than the advertised Content-Length.