(original) (raw)

changeset: 81976:d4dd297fedb1 branch: 2.7 parent: 81970:19a33ef3821d user: Éric Araujo merwok@netwok.org date: Sun Feb 03 11:41:19 2013 -0500 files: Lib/distutils/ccompiler.py Misc/NEWS description: Add alias to restore 2.7.2 compatibility for setup scripts (#13994). 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. diff -r 19a33ef3821d -r d4dd297fedb1 Lib/distutils/ccompiler.py --- a/Lib/distutils/ccompiler.py Sun Feb 03 17:10:42 2013 +0200 +++ b/Lib/distutils/ccompiler.py Sun Feb 03 11:41:19 2013 -0500 @@ -17,6 +17,8 @@ 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 diff -r 19a33ef3821d -r d4dd297fedb1 Misc/NEWS --- a/Misc/NEWS Sun Feb 03 17:10:42 2013 +0200 +++ b/Misc/NEWS Sun Feb 03 11:41:19 2013 -0500 @@ -203,6 +203,9 @@ 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. /merwok@netwok.org