Éric Araujo [Sun, 24 Jun 2012 04:07:41 +0000 (00:07 -0400)]
Remove packaging from the standard library.
Distutils2 will live on on PyPI and be included in the stdlib when it
is ready. See discussion starting at
http://mail.python.org/pipermail/python-dev/2012-June/120430.html
Ezio Melotti [Sun, 24 Jun 2012 02:37:41 +0000 (04:37 +0200)]
#11113: add a new "html5" dictionary containing the named character references defined by the HTML5 standard and the equivalent Unicode character(s) to the html.entities module.
Larry Hastings [Sat, 23 Jun 2012 23:55:07 +0000 (16:55 -0700)]
Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
parameter from os.remove / os.unlink.
Patch written by Georg Brandl. (I'm really looking forward to George
getting commit privileges so I don't have to keep doing checkins on his
behalf.)
Ned Deily [Sat, 23 Jun 2012 23:02:19 +0000 (16:02 -0700)]
Issue #13590: Improve support for OS X Xcode 4:
- Try to avoid building Python or extension modules with problematic
llvm-gcc compiler.
- Since Xcode 4 removes ppc support, extension module builds now
check for ppc compiler support and automatically remove ppc and
ppc64 archs when not available.
- Since Xcode 4 no longer install SDKs in default locations,
extension module builds now revert to using installed headers
and libs if the SDK used to build the interpreter is not
available.
- Update ./configure to use better defaults for universal builds;
in particular, --enable-universalsdk=yes uses the Xcode default
SDK and --with-universal-archs now defaults to "intel" if ppc
not available.
Hynek Schlawack [Sat, 23 Jun 2012 18:28:32 +0000 (20:28 +0200)]
#4489: Fix usage of fd-based functions to new api introduced earlier today
Also add an explicit test for safe implementation usage on supported platforms.
As a side effect, this commit adds a module-level attribute 'rmtree_is_safe'
which offers introspection whether the current rmtree implementation is safe
against symlink attacks.
Larry Hastings [Fri, 22 Jun 2012 23:30:09 +0000 (16:30 -0700)]
Issue #14626: Large refactoring of functions / parameters in the os module.
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
Larry Hastings [Fri, 22 Jun 2012 19:58:36 +0000 (12:58 -0700)]
Issue #14769: Incorporated mildly pedantic feedback from python-dev.
Mostly documentation changes; the code changes are clarifications,
not semantic changes.
Antoine Pitrou [Fri, 22 Jun 2012 19:11:52 +0000 (21:11 +0200)]
Issue #14837: SSL errors now have `library` and `reason` attributes describing precisely what happened and in which OpenSSL submodule.
The str() of a SSLError is also enhanced accordingly.
NOTE: this commit creates a reference leak. The leak seems tied to the
use of PyType_FromSpec() to create the SSLError type. The leak is on the
type object when it is instantiated:
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
35
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
36
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
37
Issue #9527: datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when
called with no arguments.
Issue #9527: datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when
called with no arguments.
Larry Hastings [Fri, 22 Jun 2012 10:56:29 +0000 (03:56 -0700)]
Issue #14769: test_capi now has SkipitemTest, which cleverly checks
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
Martin v. Löwis [Fri, 22 Jun 2012 10:20:55 +0000 (12:20 +0200)]
Issue #15042: Add PyState_AddModule and PyState_RemoveModule.
Add version guard for Py_LIMITED_API additions.
Issue #15081: Document PyState_FindModule.
Patch by Robin Schreiber.