]> granicus.if.org Git - python/log
python
13 years agoMerge heads
Antoine Pitrou [Sat, 26 Nov 2011 00:13:12 +0000 (01:13 +0100)]
Merge heads

13 years agoBetter resolution for issue #11849: Ensure that free()d memory arenas are really...
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.

13 years agoIssue #12567: The curses module uses Unicode functions for Unicode arguments
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.

13 years agoIssue #12856: Ensure child processes do not inherit the parent's random seed for...
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.

13 years agoIssue #12856: Ensure child processes do not inherit the parent's random seed for...
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.

13 years agoNEWS: fix the issue number for PyUnicode_EncodeDecimal change
Victor Stinner [Fri, 25 Nov 2011 19:11:54 +0000 (20:11 +0100)]
NEWS: fix the issue number for PyUnicode_EncodeDecimal change

13 years agoClose #13093: PyUnicode_EncodeDecimal() doesn't support error handlers
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.

13 years agoTypo
Antoine Pitrou [Fri, 25 Nov 2011 18:11:26 +0000 (19:11 +0100)]
Typo

13 years agoUpdate What's new for PEP 3155
Antoine Pitrou [Fri, 25 Nov 2011 18:10:05 +0000 (19:10 +0100)]
Update What's new for PEP 3155

13 years agoPEP 3155 / issue #13448: Qualified name for classes and functions.
Antoine Pitrou [Fri, 25 Nov 2011 17:56:07 +0000 (18:56 +0100)]
PEP 3155 / issue #13448: Qualified name for classes and functions.

13 years agoIssue #9957: SpooledTemporaryFile.truncate() now accepts an optional size parameter...
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.

13 years agoClarify concatenation behaviour of immutable strings, and remove explicit
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.

13 years agoClarify concatenation behaviour of immutable strings, and remove explicit
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.

13 years agofix some typos in Doc/c-api/memoryview.rst
Eli Bendersky [Fri, 25 Nov 2011 13:08:45 +0000 (15:08 +0200)]
fix some typos in Doc/c-api/memoryview.rst

13 years agofix 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

13 years agoAdd a "What's New" entry for #12170
Petri Lehtinen [Thu, 24 Nov 2011 20:00:46 +0000 (22:00 +0200)]
Add a "What's New" entry for #12170

13 years agomerge from 3.2 testFnNames is assigned twice.
Senthil Kumaran [Thu, 24 Nov 2011 18:09:24 +0000 (02:09 +0800)]
merge from 3.2 testFnNames is assigned twice.

13 years agotestFnNames is assigned twice.
Senthil Kumaran [Thu, 24 Nov 2011 18:08:39 +0000 (02:08 +0800)]
testFnNames is assigned twice.

13 years agoClose #13415: Test in configure if unsetenv() has a return value or not.
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.

13 years agoand back to the "magic" formula (with a comment) it is
Benjamin Peterson [Wed, 23 Nov 2011 16:44:52 +0000 (10:44 -0600)]
and back to the "magic" formula (with a comment) it is

13 years agoMerged documentation addition from 3.2.
Vinay Sajip [Wed, 23 Nov 2011 14:29:01 +0000 (14:29 +0000)]
Merged documentation addition from 3.2.

13 years agoAdded a configuration dictionary example to the logging cookbook.
Vinay Sajip [Wed, 23 Nov 2011 14:27:54 +0000 (14:27 +0000)]
Added a configuration dictionary example to the logging cookbook.

13 years agoCloses #13459: Merged fix from 3.2.
Vinay Sajip [Wed, 23 Nov 2011 08:55:59 +0000 (08:55 +0000)]
Closes #13459: Merged fix from 3.2.

13 years agoCloses #13459: Clarified documentation on Logger.propagate. Thanks to Mike Fogel...
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.

13 years agomerge 3.2 (null)
Benjamin Peterson [Wed, 23 Nov 2011 05:57:50 +0000 (23:57 -0600)]
merge 3.2 (null)

13 years agodecref correct object
Benjamin Peterson [Wed, 23 Nov 2011 05:57:23 +0000 (23:57 -0600)]
decref correct object

13 years agomerge 3.2
Benjamin Peterson [Wed, 23 Nov 2011 05:14:47 +0000 (23:14 -0600)]
merge 3.2

13 years agoplug refleak
Benjamin Peterson [Wed, 23 Nov 2011 05:12:49 +0000 (23:12 -0600)]
plug refleak

13 years agomerge heads
Benjamin Peterson [Wed, 23 Nov 2011 01:06:23 +0000 (19:06 -0600)]
merge heads

13 years agocave to those who like readable code
Benjamin Peterson [Wed, 23 Nov 2011 01:05:49 +0000 (19:05 -0600)]
cave to those who like readable code

13 years agoIssue #13458: Fix a memory leak in the ssl module when decoding a certificate with...
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.

13 years agoIssue #13458: Fix a memory leak in the ssl module when decoding a certificate with...
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.

13 years agorevert cset 6a0da9b65e54 against sched.py committed by accident
Giampaolo Rodola' [Tue, 22 Nov 2011 23:03:15 +0000 (00:03 +0100)]
revert cset 6a0da9b65e54 against sched.py committed by accident

13 years ago(Merge 3.2) Issue #13436: Fix unsetenv() test on Windows
Victor Stinner [Tue, 22 Nov 2011 21:32:28 +0000 (22:32 +0100)]
(Merge 3.2) Issue #13436: Fix unsetenv() test on Windows

13 years agoIssue #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

13 years agoMerge branch default
Victor Stinner [Tue, 22 Nov 2011 21:23:23 +0000 (22:23 +0100)]
Merge branch default

13 years agoMerge branch 3.2
Victor Stinner [Tue, 22 Nov 2011 21:22:26 +0000 (22:22 +0100)]
Merge branch 3.2

13 years ago(Merge 3.2) Issue #13415: os.unsetenv() doesn't ignore errors anymore.
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.

13 years agoMerge branch 3.2
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 21:02:01 +0000 (22:02 +0100)]
Merge branch 3.2

13 years agoIssue #13415: os.unsetenv() doesn't ignore errors anymore.
Victor Stinner [Tue, 22 Nov 2011 21:01:28 +0000 (22:01 +0100)]
Issue #13415: os.unsetenv() doesn't ignore errors anymore.

13 years agoIssue #13436: commit regenerated Python-ast.c
Amaury Forgeot d'Arc [Tue, 22 Nov 2011 20:52:30 +0000 (21:52 +0100)]
Issue #13436: commit regenerated Python-ast.c

13 years agoIssue #13436: Fix a bogus error message when an AST object was passed
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.

13 years agofix compiler warning by implementing this more cleverly
Benjamin Peterson [Tue, 22 Nov 2011 20:29:32 +0000 (15:29 -0500)]
fix compiler warning by implementing this more cleverly

13 years agosort last committed name in alphabetical order
Giampaolo Rodola' [Tue, 22 Nov 2011 20:19:37 +0000 (21:19 +0100)]
sort last committed name in alphabetical order

13 years agoIssue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
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).

13 years agoIssue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
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).

13 years agobytes() can't be used to get a representation of an object.
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.

13 years agoIssue #12156: Skip test_multiprocessing on systems which don't support enough
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).

13 years agoIssue #13093: Perform a real merge.
Charles-François Natali [Tue, 22 Nov 2011 17:53:49 +0000 (18:53 +0100)]
Issue #13093: Perform a real merge.

13 years agoIssue #12156: Skip test_multiprocessing on systems which don't support enough
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).

13 years agofix wrong credit and issue id given in previous commit
Giampaolo Rodola' [Tue, 22 Nov 2011 12:37:58 +0000 (13:37 +0100)]
fix wrong credit and issue id given in previous commit

13 years agoFix 13245:
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.

13 years agofind_maxchar_surrogates() reuses surrogate macros
Victor Stinner [Tue, 22 Nov 2011 02:38:40 +0000 (03:38 +0100)]
find_maxchar_surrogates() reuses surrogate macros

13 years agoRemove "#ifdef Py_UNICODE_WIDE": Python is now always wide
Victor Stinner [Tue, 22 Nov 2011 02:31:20 +0000 (03:31 +0100)]
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide

13 years agoIssue #13441: Disable temporary the check on the maximum character until
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".

13 years agoFix compiler warnings
Victor Stinner [Tue, 22 Nov 2011 01:30:47 +0000 (02:30 +0100)]
Fix compiler warnings

13 years agoUse the new Unicode API
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()

13 years ago(Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()
Victor Stinner [Tue, 22 Nov 2011 00:50:07 +0000 (01:50 +0100)]
(Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()

13 years agoIssue #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()

13 years agoPyUnicode_FromKindAndData() fails with a ValueError if size < 0
Victor Stinner [Tue, 22 Nov 2011 00:29:14 +0000 (01:29 +0100)]
PyUnicode_FromKindAndData() fails with a ValueError if size < 0

13 years agoUTF-8 decoder: set consumed value in the latin1 fast-path
Victor Stinner [Tue, 22 Nov 2011 00:23:02 +0000 (01:23 +0100)]
UTF-8 decoder: set consumed value in the latin1 fast-path

13 years agoReplace _PyUnicode_READY_REPLACE() and _PyUnicode_ReadyReplace() with unicode_ready()
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

13 years agoAdd a test on str.__getnewargs__()
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.

13 years agoRewrite PyUnicode_TransformDecimalToASCII() to use the new Unicode API
Victor Stinner [Mon, 21 Nov 2011 22:12:56 +0000 (23:12 +0100)]
Rewrite PyUnicode_TransformDecimalToASCII() to use the new Unicode API

13 years agoRemove an unused variable from PyUnicode_Copy()
Victor Stinner [Mon, 21 Nov 2011 22:11:52 +0000 (23:11 +0100)]
Remove an unused variable from PyUnicode_Copy()

13 years agoSimplify PyUnicode_Copy()
Victor Stinner [Mon, 21 Nov 2011 22:03:47 +0000 (23:03 +0100)]
Simplify PyUnicode_Copy()

USe PyUnicode_Copy() in fixup()

13 years agoFix a compiler warning in _PyUnicode_CheckConsistency()
Victor Stinner [Mon, 21 Nov 2011 21:54:05 +0000 (22:54 +0100)]
Fix a compiler warning in _PyUnicode_CheckConsistency()

13 years agoRewrite PyUnicode_EncodeDecimal() to use the new Unicode API
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().

13 years agoIssue #12328: Under Windows, refactor handling of Ctrl-C events and
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.

13 years agoIssue #13411: memoryview objects are now hashable when the underlying object is hashable.
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.

13 years agoIssue #13417: speed up utf-8 decoding by around 2x for the non-fully-ASCII case.
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.

13 years agoIssue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
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.

13 years agoIssue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
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.

13 years agoIssue #13441: Reenable strxfrm() tests on Solaris
Victor Stinner [Mon, 21 Nov 2011 17:04:30 +0000 (18:04 +0100)]
Issue #13441: Reenable strxfrm() tests on Solaris

13 years agoRemove temporary hacks for the issue #13441
Victor Stinner [Mon, 21 Nov 2011 15:01:27 +0000 (16:01 +0100)]
Remove temporary hacks for the issue #13441

13 years agoAnother temporary hack to debug 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

13 years agoIssue #13441: _PyUnicode_CheckConsistency() dumps the string if the maximum
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.

13 years agoWhat's new in Python 3.3: Rephrase PEP 393 doc
Victor Stinner [Mon, 21 Nov 2011 12:14:43 +0000 (13:14 +0100)]
What's new in Python 3.3: Rephrase PEP 393 doc

13 years agowinreg module avoids the deprecated Unicode API
Victor Stinner [Mon, 21 Nov 2011 11:43:50 +0000 (12:43 +0100)]
winreg module avoids the deprecated Unicode API

13 years agoIssue #13441: Disable temporary localeconv() tests on Solaris
Victor Stinner [Mon, 21 Nov 2011 02:19:05 +0000 (03:19 +0100)]
Issue #13441: Disable temporary localeconv() tests on Solaris

13 years agoCJK codecs checks for conversion to Py_UNICODE* failures
Victor Stinner [Mon, 21 Nov 2011 02:01:27 +0000 (03:01 +0100)]
CJK codecs checks for conversion to Py_UNICODE* failures

13 years agoMultibyteCodec_Encode() checks if PyUnicode_AS_UNICODE() failed
Victor Stinner [Mon, 21 Nov 2011 01:50:14 +0000 (02:50 +0100)]
MultibyteCodec_Encode() checks if PyUnicode_AS_UNICODE() failed

13 years agoFix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
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()

13 years agoPyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed
Victor Stinner [Mon, 21 Nov 2011 01:24:49 +0000 (02:24 +0100)]
PyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed
using an assertion

13 years agoFix a typo in PC/_subprocess.c
Victor Stinner [Mon, 21 Nov 2011 01:17:08 +0000 (02:17 +0100)]
Fix a typo in PC/_subprocess.c

13 years agoctypes check for PyUnicode_GET_SIZE() failure
Victor Stinner [Mon, 21 Nov 2011 01:11:26 +0000 (02:11 +0100)]
ctypes check for PyUnicode_GET_SIZE() failure

13 years agotest_widechar() uses the new Unicode API
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()

13 years agoCheck for PyUnicode_AS_UNICODE() failure
Victor Stinner [Mon, 21 Nov 2011 01:01:41 +0000 (02:01 +0100)]
Check for PyUnicode_AS_UNICODE() failure

13 years agoUnicodeTranslateError uses the new Unicode API
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.

13 years agoIssue #13441: Disable temporary strxfrm() tests on Solaris
Victor Stinner [Mon, 21 Nov 2011 00:02:23 +0000 (01:02 +0100)]
Issue #13441: Disable temporary strxfrm() tests on Solaris

13 years ago(Merge 3.2) Close #13401: Skip TestFileTypeW of test_argparse if the current user...
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.

13 years agoClose #13401: Skip TestFileTypeW of test_argparse if the current user is root
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.

13 years agoUnicodeEncodeError uses the new Unicode API
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.

13 years agoPyObject_Str() ensures that the result string is ready
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.

13 years agoUse PyUnicode_CompareWithASCIIString() instead of Py_UNICODE_strcmp() to avoid
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

13 years agostringlib: remove unused STRINGLIB_FILL
Victor Stinner [Sun, 20 Nov 2011 18:30:15 +0000 (19:30 +0100)]
stringlib: remove unused STRINGLIB_FILL

13 years agoprint_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()
Victor Stinner [Sun, 20 Nov 2011 18:20:00 +0000 (19:20 +0100)]
print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()

13 years agoPyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(),
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

13 years ago_PyUnicode_CheckConsistency() also checks maxchar maximum value,
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

13 years agoRemove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros
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