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.
Hynek Schlawack [Fri, 22 Jun 2012 07:32:22 +0000 (09:32 +0200)]
Simplify code in fileio_init
If an identical code line is in both at the end of if and else, it can as well
stand after the block. :) The code is from 464cf523485e, I didn't see it before
checking the commits in the web interface of course.
Nadeem Vawda [Thu, 21 Jun 2012 21:36:48 +0000 (23:36 +0200)]
Make lzma.{encode,decode}_filter_properties private.
These functions were originally added to support LZMA compression in the zipfile
module, and are not of interest for the majority of users.
They can be made public in 3.4 if there is user interest, but in the meanwhile,
I've opted to present a smaller, simpler API for the module's initial release.
Ned Deily [Thu, 21 Jun 2012 06:47:14 +0000 (23:47 -0700)]
Issue #14225: Fix Unicode support for curses (#12567) on OS X:
1. on OS X, there is no separate /usr/lib/libcursesw nor libpanelw
2. _XOPEN_SOURCE_EXTENDED must be enabled for _curses build
Antoine Pitrou [Tue, 19 Jun 2012 14:33:39 +0000 (16:33 +0200)]
Issue #15103: remove the NUL character (serving as a Mercurial binary marker) from Python/importlib.h.
Instead the email notification hook uses a configuration option to omit importlib.h diffs.
Issue #15038:
Fix incorrect test of the condition variable state, spotted by
Richard Oudkerk. This could cause the internal condition variable
to grow without bounds.
Issue #15038: Optimize python Locks on Windows
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.