Skip to content

Commit

Permalink
Add alias to restore 2.7.2 compatibility for setup scripts (#13994).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
merwok committed Feb 3, 2013
1 parent 354d50e commit 3e081c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 3e081c7

Please sign in to comment.