Gregory P. Smith [Sun, 12 Feb 2012 23:56:49 +0000 (15:56 -0800)]
Issue #13930: Adds ability for 2to3 to write its output to a different
directory tree instead of overwriting the input files. Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.
Gregory P. Smith [Sun, 12 Feb 2012 23:50:21 +0000 (15:50 -0800)]
Issue #13930: Adds ability for 2to3 to write its output to a different
directory tree instead of overwriting the input files. Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.
Feature backports into stable release branches for 2to3 are allowed by
a special exemption:
http://mail.python.org/pipermail/python-dev/2011-December/115089.html
Antoine Pitrou [Sun, 12 Feb 2012 18:15:09 +0000 (19:15 +0100)]
Issue #10287: nntplib now queries the server's CAPABILITIES again after authenticating (since the result may change, according to RFC 4643).
Patch by Hynek Schlawack.
Antoine Pitrou [Sun, 12 Feb 2012 18:14:17 +0000 (19:14 +0100)]
Issue #10287: nntplib now queries the server's CAPABILITIES again after authenticating (since the result may change, according to RFC 4643).
Patch by Hynek Schlawack.
Éric Araujo [Sun, 12 Feb 2012 03:52:21 +0000 (04:52 +0100)]
Fix distutils.filelist.FileList under Windows (#13193).
The code used to call os.path.join to build a regex but without escaping
the backslash, which lead to test failures on Windows. Antoine Pitrou
fixed it in 0a94e2f807c7 by enhancing the code to accept both / and \,
with proper escaping, but in my opinion this goes against the distutils
feature freeze, hence this change.
Ned Deily [Fri, 10 Feb 2012 12:01:08 +0000 (13:01 +0100)]
Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons. If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4. This change does not
attempt to override settings to support their use with Xcode 4.)
Éric Araujo [Fri, 10 Feb 2012 04:20:53 +0000 (05:20 +0100)]
Use sys.version_info instead of sys.version in packaging.
The contents of this attribute are an implementation detail, as
documented for #9442, so we should not parse it, to support non-CPython
VMs with distutils2 in the future.
Unfortunately, one use comes directly from PEP 345, so an edit will have
to be agreed before fixing the code (see comment in p7g.markers).
Other remaining uses are found in p7g.compiler and could be replaced by
the platform module (which also parses sys.version, but then it wouldn’t
be my fault :)
Éric Araujo [Thu, 9 Feb 2012 20:37:14 +0000 (21:37 +0100)]
Start improving 2to3 code in packaging (#13462).
- Change the fixers used in tests to something not provided by lib2to3
- Test conversion of doctests in text files
- Factor out test boilerplate into a common method
Éric Araujo [Thu, 9 Feb 2012 13:29:11 +0000 (14:29 +0100)]
Group commands by topic in “pysetup run --list-commands” output.
This fixes a regression from distutils, where “setup.py --help-commands”
prints out commands grouped by topic (i.e. building vs. installing),
which is more useful than using sorted.
Brett Cannon [Wed, 8 Feb 2012 23:52:56 +0000 (18:52 -0500)]
Use the cwd when the empty string is found in sys.path. This leads to
__file__ being an absolute path when the module is found in the
current directory.
Antoine Pitrou [Wed, 8 Feb 2012 22:28:36 +0000 (23:28 +0100)]
Issue #13609: Add two functions to query the terminal size:
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on Connection
sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to make sure two
listeners can't bind to the same socket/pipe (or any existing socket/pipe).
Victor Stinner [Tue, 7 Feb 2012 22:41:01 +0000 (23:41 +0100)]
Issue #13845: time.time() now uses GetSystemTimeAsFileTime() instead of ftime()
to have a resolution of 100 ns instead of 1 ms (the clock accuracy is between
0.5 ms and 15 ms).
Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), to
be consistent with other functions accepting file descriptors (fdlistdir() was
added in 3.3, so hasn't been released yet).
Éric Araujo [Sun, 5 Feb 2012 09:26:16 +0000 (10:26 +0100)]
Stop converting package_data to extra_files in pysetup create (#13712).
pysetup create, the setup.cfg creation helper, used to convert
package_data (from an existing setup.py) into extra_files, the
replacement for MANIFEST.in, but these files are only present in sdists,
not installed: they don’t have the same use case at all, so converting
one into the other did not work.