]>
granicus.if.org Git - python/log
Antoine Pitrou [Sat, 26 Nov 2011 00:13:12 +0000 (01:13 +0100)]
Merge heads
Antoine Pitrou [Sat, 26 Nov 2011 00:11:02 +0000 (01:11 +0100)]
Better resolution for issue #11849: Ensure that free()d memory arenas are really released
on POSIX systems supporting anonymous memory mappings. Patch by Charles-François Natali.
Victor Stinner [Fri, 25 Nov 2011 21:10:02 +0000 (22:10 +0100)]
Issue #12567: The curses module uses Unicode functions for Unicode arguments
when it is linked to the ncurses library. It encodes also Unicode strings to
the locale encoding instead of UTF-8.
Antoine Pitrou [Fri, 25 Nov 2011 20:29:27 +0000 (21:29 +0100)]
Issue #12856: Ensure child processes do not inherit the parent's random seed for filename generation in the tempfile module.
Patch by Brian Harring.
Antoine Pitrou [Fri, 25 Nov 2011 20:28:15 +0000 (21:28 +0100)]
Issue #12856: Ensure child processes do not inherit the parent's random seed for filename generation in the tempfile module.
Patch by Brian Harring.
Victor Stinner [Fri, 25 Nov 2011 19:11:54 +0000 (20:11 +0100)]
NEWS: fix the issue number for PyUnicode_EncodeDecimal change
Victor Stinner [Fri, 25 Nov 2011 19:09:01 +0000 (20:09 +0100)]
Close #13093: PyUnicode_EncodeDecimal() doesn't support error handlers
different than "strict" anymore. The caller was unable to compute the
size of the output buffer: it depends on the error handler.
Antoine Pitrou [Fri, 25 Nov 2011 18:11:26 +0000 (19:11 +0100)]
Typo
Antoine Pitrou [Fri, 25 Nov 2011 18:10:05 +0000 (19:10 +0100)]
Update What's new for PEP 3155
Antoine Pitrou [Fri, 25 Nov 2011 17:56:07 +0000 (18:56 +0100)]
PEP 3155 / issue #13448: Qualified name for classes and functions.
Antoine Pitrou [Fri, 25 Nov 2011 17:03:09 +0000 (18:03 +0100)]
Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size parameter, as other file-like objects.
Patch by Ryan Kelly.
Antoine Pitrou [Fri, 25 Nov 2011 15:34:23 +0000 (16:34 +0100)]
Clarify concatenation behaviour of immutable strings, and remove explicit
mention of the CPython optimization hack.
Antoine Pitrou [Fri, 25 Nov 2011 15:33:53 +0000 (16:33 +0100)]
Clarify concatenation behaviour of immutable strings, and remove explicit
mention of the CPython optimization hack.
Eli Bendersky [Fri, 25 Nov 2011 13:08:45 +0000 (15:08 +0200)]
fix some typos in Doc/c-api/memoryview.rst
Eli Bendersky [Fri, 25 Nov 2011 13:07:50 +0000 (15:07 +0200)]
fix some typos in Doc/c-api/memoryview.rst
Petri Lehtinen [Thu, 24 Nov 2011 20:00:46 +0000 (22:00 +0200)]
Add a "What's New" entry for #12170
Senthil Kumaran [Thu, 24 Nov 2011 18:09:24 +0000 (02:09 +0800)]
merge from 3.2 testFnNames is assigned twice.
Senthil Kumaran [Thu, 24 Nov 2011 18:08:39 +0000 (02:08 +0800)]
testFnNames is assigned twice.
Victor Stinner [Thu, 24 Nov 2011 12:53:38 +0000 (13:53 +0100)]
Close #13415: Test in configure if unsetenv() has a return value or not.
Patch written by Charles-François Natali.
Benjamin Peterson [Wed, 23 Nov 2011 16:44:52 +0000 (10:44 -0600)]
and back to the "magic" formula (with a comment) it is
Vinay Sajip [Wed, 23 Nov 2011 14:29:01 +0000 (14:29 +0000)]
Merged documentation addition from 3.2.
Vinay Sajip [Wed, 23 Nov 2011 14:27:54 +0000 (14:27 +0000)]
Added a configuration dictionary example to the logging cookbook.
Vinay Sajip [Wed, 23 Nov 2011 08:55:59 +0000 (08:55 +0000)]
Closes #13459: Merged fix from 3.2.
Vinay Sajip [Wed, 23 Nov 2011 08:54:22 +0000 (08:54 +0000)]
Closes #13459: Clarified documentation on Logger.propagate. Thanks to Mike Fogel for the patch.
Benjamin Peterson [Wed, 23 Nov 2011 05:57:50 +0000 (23:57 -0600)]
merge 3.2 (null)
Benjamin Peterson [Wed, 23 Nov 2011 05:57:23 +0000 (23:57 -0600)]
decref correct object
Benjamin Peterson [Wed, 23 Nov 2011 05:14:47 +0000 (23:14 -0600)]
merge 3.2
Benjamin Peterson [Wed, 23 Nov 2011 05:12:49 +0000 (23:12 -0600)]
plug refleak
Benjamin Peterson [Wed, 23 Nov 2011 01:06:23 +0000 (19:06 -0600)]
merge heads
Benjamin Peterson [Wed, 23 Nov 2011 01:05:49 +0000 (19:05 -0600)]
cave to those who like readable code
Antoine Pitrou [Wed, 23 Nov 2011 00:42:52 +0000 (01:42 +0100)]
Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
Patch by Robert Xiao.
Antoine Pitrou [Wed, 23 Nov 2011 00:39:19 +0000 (01:39 +0100)]
Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
Patch by Robert Xiao.
Giampaolo Rodola' [Tue, 22 Nov 2011 23:03:15 +0000 (00:03 +0100)]
revert cset
6a0da9b65e54 against sched.py committed by accident
Victor Stinner [Tue, 22 Nov 2011 21:32:28 +0000 (22:32 +0100)]
(Merge 3.2) Issue #13436: Fix unsetenv() test on Windows
Victor Stinner [Tue, 22 Nov 2011 21:30:19 +0000 (22:30 +0100)]
Issue #13436: Fix unsetenv() test on Windows
Victor Stinner [Tue, 22 Nov 2011 21:23:23 +0000 (22:23 +0100)]
Merge branch default
Victor Stinner [Tue, 22 Nov 2011 21:22:26 +0000 (22:22 +0100)]
Merge branch 3.2
Victor Stinner [Tue, 22 Nov 2011 21:16:17 +0000 (22:16 +0100)]
(Merge 3.2) Issue #13415: os.unsetenv() doesn't ignore errors anymore.
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 21:02:01 +0000 (22:02 +0100)]
Merge branch 3.2
Victor Stinner [Tue, 22 Nov 2011 21:01:28 +0000 (22:01 +0100)]
Issue #13415: os.unsetenv() doesn't ignore errors anymore.
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 20:52:30 +0000 (21:52 +0100)]
Issue #13436: commit regenerated Python-ast.c
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 20:51:55 +0000 (21:51 +0100)]
Issue #13436: Fix a bogus error message when an AST object was passed
an invalid integer value.
Benjamin Peterson [Tue, 22 Nov 2011 20:29:32 +0000 (15:29 -0500)]
fix compiler warning by implementing this more cleverly
Giampaolo Rodola' [Tue, 22 Nov 2011 20:19:37 +0000 (21:19 +0100)]
sort last committed name in alphabetical order
Charles-François Natali [Tue, 22 Nov 2011 18:51:14 +0000 (19:51 +0100)]
Issue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
TLS key only if the thread that called fork() had an associated auto thread
state (this might not be the case for example for a thread created outside of
Python calling into a subinterpreter).
Charles-François Natali [Tue, 22 Nov 2011 18:49:51 +0000 (19:49 +0100)]
Issue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
TLS key only if the thread that called fork() had an associated auto thread
state (this might not be the case for example for a thread created outside of
Python calling into a subinterpreter).
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 18:34:08 +0000 (19:34 +0100)]
bytes() can't be used to get a representation of an object.
Charles-François Natali [Tue, 22 Nov 2011 17:55:22 +0000 (18:55 +0100)]
Issue #12156: Skip test_multiprocessing on systems which don't support enough
POSIX semaphores (among which FreeBSD < 8).
Charles-François Natali [Tue, 22 Nov 2011 17:53:49 +0000 (18:53 +0100)]
Issue #13093: Perform a real merge.
Charles-François Natali [Tue, 22 Nov 2011 17:36:39 +0000 (18:36 +0100)]
Issue #12156: Skip test_multiprocessing on systems which don't support enough
POSIX semaphores (among which FreeBSD < 8).
Giampaolo Rodola' [Tue, 22 Nov 2011 12:37:58 +0000 (13:37 +0100)]
fix wrong credit and issue id given in previous commit
Giampaolo Rodola' [Tue, 22 Nov 2011 12:33:34 +0000 (13:33 +0100)]
Fix 13245:
sched.scheduler class constructor's timefunc and delayfunct parameters are now optional.
scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter.
Patch contributed by Matt Mulsow.
Victor Stinner [Tue, 22 Nov 2011 02:38:40 +0000 (03:38 +0100)]
find_maxchar_surrogates() reuses surrogate macros
Victor Stinner [Tue, 22 Nov 2011 02:31:20 +0000 (03:31 +0100)]
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
Victor Stinner [Tue, 22 Nov 2011 02:27:53 +0000 (03:27 +0100)]
Issue #13441: Disable temporary the check on the maximum character until
the Solaris issue is solved.
But add assertion on the maximum character in various encoders: UTF-7, UTF-8,
wide character (wchar_t*, Py_UNICODE*), unicode-escape, raw-unicode-escape.
Fix also unicode_encode_ucs1() for backslashreplace error handler: Python is
now always "wide".
Victor Stinner [Tue, 22 Nov 2011 01:30:47 +0000 (02:30 +0100)]
Fix compiler warnings
Victor Stinner [Tue, 22 Nov 2011 01:27:30 +0000 (02:27 +0100)]
Use the new Unicode API
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
* Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
* Replace Py_UNICODE by wchar_t
* posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
of PyUnicode_FromUnicode() + _snwprintf()
Victor Stinner [Tue, 22 Nov 2011 00:50:07 +0000 (01:50 +0100)]
(Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()
Victor Stinner [Tue, 22 Nov 2011 00:45:37 +0000 (01:45 +0100)]
Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()
* Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII()
* Remove the unused "e" variable in replace()
Victor Stinner [Tue, 22 Nov 2011 00:29:14 +0000 (01:29 +0100)]
PyUnicode_FromKindAndData() fails with a ValueError if size < 0
Victor Stinner [Tue, 22 Nov 2011 00:23:02 +0000 (01:23 +0100)]
UTF-8 decoder: set consumed value in the latin1 fast-path
Victor Stinner [Tue, 22 Nov 2011 00:22:34 +0000 (01:22 +0100)]
Replace _PyUnicode_READY_REPLACE() and _PyUnicode_ReadyReplace() with unicode_ready()
* unicode_ready() has a simpler API
* try to reuse unicode_empty and latin1_char singleton everywhere
* Fix a reference leak in _PyUnicode_TranslateCharmap()
* PyUnicode_InternInPlace() doesn't try to get a singleton anymore, to avoid
having to handle a failure
Victor Stinner [Tue, 22 Nov 2011 00:06:15 +0000 (01:06 +0100)]
Add a test on str.__getnewargs__()
It tests indirectly PyUnicode_Copy(): ensure that the string is a copy.
Victor Stinner [Mon, 21 Nov 2011 22:12:56 +0000 (23:12 +0100)]
Rewrite PyUnicode_TransformDecimalToASCII() to use the new Unicode API
Victor Stinner [Mon, 21 Nov 2011 22:11:52 +0000 (23:11 +0100)]
Remove an unused variable from PyUnicode_Copy()
Victor Stinner [Mon, 21 Nov 2011 22:03:47 +0000 (23:03 +0100)]
Simplify PyUnicode_Copy()
USe PyUnicode_Copy() in fixup()
Victor Stinner [Mon, 21 Nov 2011 21:54:05 +0000 (22:54 +0100)]
Fix a compiler warning in _PyUnicode_CheckConsistency()
Victor Stinner [Mon, 21 Nov 2011 21:52:58 +0000 (22:52 +0100)]
Rewrite PyUnicode_EncodeDecimal() to use the new Unicode API
Add tests for PyUnicode_EncodeDecimal() and
PyUnicode_TransformDecimalToASCII().
Antoine Pitrou [Mon, 21 Nov 2011 20:26:56 +0000 (21:26 +0100)]
Issue #12328: Under Windows, refactor handling of Ctrl-C events and
make _multiprocessing.win32.WaitForMultipleObjects interruptible when
the wait_flag parameter is false. Patch by sbt.
Antoine Pitrou [Mon, 21 Nov 2011 19:46:33 +0000 (20:46 +0100)]
Issue #13411: memoryview objects are now hashable when the underlying object is hashable.
Antoine Pitrou [Mon, 21 Nov 2011 19:39:13 +0000 (20:39 +0100)]
Issue #13417: speed up utf-8 decoding by around 2x for the non-fully-ASCII case.
This almost catches up with pre-PEP 393 performance, when decoding needed
only one pass.
Antoine Pitrou [Mon, 21 Nov 2011 19:22:01 +0000 (20:22 +0100)]
Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
Antoine Pitrou [Mon, 21 Nov 2011 19:16:44 +0000 (20:16 +0100)]
Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
Victor Stinner [Mon, 21 Nov 2011 17:04:30 +0000 (18:04 +0100)]
Issue #13441: Reenable strxfrm() tests on Solaris
Victor Stinner [Mon, 21 Nov 2011 15:01:27 +0000 (16:01 +0100)]
Remove temporary hacks for the issue #13441
Victor Stinner [Mon, 21 Nov 2011 14:41:17 +0000 (15:41 +0100)]
Another temporary hack to debug the issue #13441
Dump the wchar_t that we are going to decode and dump the locale
Victor Stinner [Mon, 21 Nov 2011 13:31:41 +0000 (14:31 +0100)]
Issue #13441: _PyUnicode_CheckConsistency() dumps the string if the maximum
character is bigger than U+10FFFF and locale.localeconv() dumps the string
before decoding it.
Temporary hack to debug the issue #13441.
Victor Stinner [Mon, 21 Nov 2011 12:14:43 +0000 (13:14 +0100)]
What's new in Python 3.3: Rephrase PEP 393 doc
Victor Stinner [Mon, 21 Nov 2011 11:43:50 +0000 (12:43 +0100)]
winreg module avoids the deprecated Unicode API
Victor Stinner [Mon, 21 Nov 2011 02:19:05 +0000 (03:19 +0100)]
Issue #13441: Disable temporary localeconv() tests on Solaris
Victor Stinner [Mon, 21 Nov 2011 02:01:27 +0000 (03:01 +0100)]
CJK codecs checks for conversion to Py_UNICODE* failures
Victor Stinner [Mon, 21 Nov 2011 01:50:14 +0000 (02:50 +0100)]
MultibyteCodec_Encode() checks if PyUnicode_AS_UNICODE() failed
Victor Stinner [Mon, 21 Nov 2011 01:49:52 +0000 (02:49 +0100)]
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
Victor Stinner [Mon, 21 Nov 2011 01:24:49 +0000 (02:24 +0100)]
PyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed
using an assertion
Victor Stinner [Mon, 21 Nov 2011 01:17:08 +0000 (02:17 +0100)]
Fix a typo in PC/_subprocess.c
Victor Stinner [Mon, 21 Nov 2011 01:11:26 +0000 (02:11 +0100)]
ctypes check for PyUnicode_GET_SIZE() failure
Victor Stinner [Mon, 21 Nov 2011 01:06:57 +0000 (02:06 +0100)]
test_widechar() uses the new Unicode API
PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
Victor Stinner [Mon, 21 Nov 2011 01:01:41 +0000 (02:01 +0100)]
Check for PyUnicode_AS_UNICODE() failure
Victor Stinner [Mon, 21 Nov 2011 00:17:27 +0000 (01:17 +0100)]
UnicodeTranslateError uses the new Unicode API
The index is a character index, not a index in a Py_UNICODE* string.
Victor Stinner [Mon, 21 Nov 2011 00:02:23 +0000 (01:02 +0100)]
Issue #13441: Disable temporary strxfrm() tests on Solaris
Victor Stinner [Sun, 20 Nov 2011 22:10:12 +0000 (23:10 +0100)]
(Merge 3.2) Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
Patch written by Arfrever Frehtes Taifersar Arahesis.
Victor Stinner [Sun, 20 Nov 2011 22:09:09 +0000 (23:09 +0100)]
Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
Patch written by Arfrever Frehtes Taifersar Arahesis.
Victor Stinner [Sun, 20 Nov 2011 21:50:23 +0000 (22:50 +0100)]
UnicodeEncodeError uses the new Unicode API
The index is a character index, not a index in a Py_UNICODE* string.
Victor Stinner [Sun, 20 Nov 2011 18:48:36 +0000 (19:48 +0100)]
PyObject_Str() ensures that the result string is ready
and check the string consistency.
_PyUnicode_CheckConsistency() doesn't check the hash anymore. It should be
possible to call this function even if hash(str) was already called.
Victor Stinner [Sun, 20 Nov 2011 18:32:09 +0000 (19:32 +0100)]
Use PyUnicode_CompareWithASCIIString() instead of Py_UNICODE_strcmp() to avoid
the deprecate Py_UNICODE type
Victor Stinner [Sun, 20 Nov 2011 18:30:15 +0000 (19:30 +0100)]
stringlib: remove unused STRINGLIB_FILL
Victor Stinner [Sun, 20 Nov 2011 18:20:00 +0000 (19:20 +0100)]
print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()
Victor Stinner [Sun, 20 Nov 2011 18:12:52 +0000 (19:12 +0100)]
PyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(),
instead of calling the deprecated PyUnicode_EncodeUTF32() function
Victor Stinner [Sun, 20 Nov 2011 17:56:05 +0000 (18:56 +0100)]
_PyUnicode_CheckConsistency() also checks maxchar maximum value,
not only its minimum value
Victor Stinner [Sun, 20 Nov 2011 17:41:31 +0000 (18:41 +0100)]
Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros