Zachary Ware [Mon, 16 Dec 2013 15:02:41 +0000 (09:02 -0600)]
Issue #19987: Re-write test_alias_fallback in test_winsound to have two
acceptable outcomes: success or RuntimeError. Without being able to
actually hear whether a sound was played, either one could be right, but
any other error would be a failure.
Serhiy Storchaka [Mon, 16 Dec 2013 13:14:19 +0000 (15:14 +0200)]
Issue #19912: Fixed numerous bugs in ntpath.splitunc().
* splitunc() no more return illegal result for paths with redundant slashes.
* splitunc() now correctly processes the 'İ' character
(U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
* Deprecation warnings now emitted for every use of splitunc().
* Added tests for splitunc().
Serhiy Storchaka [Mon, 16 Dec 2013 13:13:28 +0000 (15:13 +0200)]
Issue #19912: Fixed numerous bugs in ntpath.splitunc().
* splitunc() no more return illegal result for paths with redundant slashes.
* splitunc() now correctly processes the 'İ' character
(U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
* Deprecation warnings now emitted for every use of splitunc().
* Added tests for splitunc().
Stefan Krah [Sat, 14 Dec 2013 11:58:09 +0000 (12:58 +0100)]
Fix C++ header usage. This __STDC_LIMIT_MACROS scheme can still be subverted
by including stdint.h before mpdecimal.h. In that case the only option left
is to compile with -D_STDC_LIMIT_MACROS.
Victor Stinner [Fri, 13 Dec 2013 10:08:56 +0000 (11:08 +0100)]
Issue #19787: PyThread_set_key_value() now always set the value
In Python 3.3, PyThread_set_key_value() did nothing if the key already exists
(if the current value is a non-NULL pointer).
When _PyGILState_NoteThreadState() is called twice on the same thread with a
different Python thread state, it still keeps the old Python thread state to
keep the old behaviour. Replacing the Python thread state with the new state
introduces new bugs: see issues #10915 and #15751.
Victor Stinner [Fri, 13 Dec 2013 02:22:00 +0000 (03:22 +0100)]
Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,
the function did nothing if the key already exists (if the current value is a
non-NULL pointer).
_testcapi.run_in_subinterp() now correctly sets the new Python thread state of
the current thread when a subinterpreter is created.
Victor Stinner [Fri, 13 Dec 2013 01:17:29 +0000 (02:17 +0100)]
Issue #14432: Generator now clears the borrowed reference to the thread state
Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
Victor Stinner [Fri, 13 Dec 2013 01:01:38 +0000 (02:01 +0100)]
Issue #14432: Remove the thread state field from the frame structure. Fix a
crash when a generator is created in a C thread that is destroyed while the
generator is still used. The issue was that a generator contains a frame, and
the frame kept a reference to the Python state of the destroyed C thread. The
crash occurs when a trace function is setup.
Victor Stinner [Fri, 13 Dec 2013 00:46:43 +0000 (01:46 +0100)]
Close #19576: PyGILState_Ensure() now initializes threads. At startup, Python
has no concrete GIL. If PyGILState_Ensure() is called from a new thread for the
first time and PyEval_InitThreads() was not called yet, a GIL needs to be
created.
R David Murray [Wed, 11 Dec 2013 21:34:34 +0000 (16:34 -0500)]
#19063: partially fix set_payload handling of non-ASCII string input.
This is a backward compatible partial fix, the complete fix requires raising
an error instead of accepting the invalid input, so the real fix is only
suitable for 3.4.
Serhiy Storchaka [Wed, 11 Dec 2013 19:26:36 +0000 (21:26 +0200)]
Issue #17576: Deprecation warning emitted now when __int__() or __index__()
return not int instance. Introduced _PyLong_FromNbInt() and refactored
PyLong_As*() functions.
Serhiy Storchaka [Wed, 11 Dec 2013 19:07:54 +0000 (21:07 +0200)]
Issue #17576: Deprecation warning emitted now when __int__() or __index__()
return not int instance. Introduced _PyLong_FromNbInt() and refactored
PyLong_As*() functions.
Gregory P. Smith [Wed, 11 Dec 2013 02:25:21 +0000 (18:25 -0800)]
Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the
fix to Issue #14635 in Python 3.3.0 to be interpreted as milliseconds instead
of seconds when the platform supports select.poll (ie: everywhere). It is now
treated as seconds once again.