Commit Graph

52276 Commits

Author SHA1 Message Date
Antoine Pitrou 0a3229de6b 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.
2011-11-21 20:39:13 +01:00
Antoine Pitrou 7fe601c5bf 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.
2011-11-21 20:22:01 +01:00
Antoine Pitrou 58fcf9f801 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.
2011-11-21 20:16:44 +01:00
Victor Stinner 41dde32bf2 Issue #13441: Reenable strxfrm() tests on Solaris 2011-11-21 18:04:30 +01:00
Victor Stinner ce0e7daf41 Remove temporary hacks for the issue #13441 2011-11-21 16:01:27 +01:00
Victor Stinner a697b37300 Another temporary hack to debug the issue #13441
Dump the wchar_t that we are going to decode and dump the locale
2011-11-21 15:41:17 +01:00
Victor Stinner da29cc36aa 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.
2011-11-21 14:31:41 +01:00
Victor Stinner a996f1e1a0 What's new in Python 3.3: Rephrase PEP 393 doc 2011-11-21 13:14:43 +01:00
Victor Stinner be49244bdc winreg module avoids the deprecated Unicode API 2011-11-21 12:43:50 +01:00
Victor Stinner 0293db69a0 Issue #13441: Disable temporary localeconv() tests on Solaris 2011-11-21 03:19:05 +01:00
Victor Stinner 4eea849469 CJK codecs checks for conversion to Py_UNICODE* failures 2011-11-21 03:01:27 +01:00
Victor Stinner 9a80faba88 MultibyteCodec_Encode() checks if PyUnicode_AS_UNICODE() failed 2011-11-21 02:50:14 +01:00
Victor Stinner 9e30aa52fd Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
2011-11-21 02:49:52 +01:00
Victor Stinner f3ae6208c7 PyUnicode_GET_SIZE() checks that PyUnicode_AsUnicode() succeed
using an assertion
2011-11-21 02:24:49 +01:00
Victor Stinner dcbbd9ea21 Fix a typo in PC/_subprocess.c 2011-11-21 02:17:08 +01:00
Victor Stinner ea90e0fd95 ctypes check for PyUnicode_GET_SIZE() failure 2011-11-21 02:11:26 +01:00
Victor Stinner 8ef18872b4 test_widechar() uses the new Unicode API
PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
2011-11-21 02:06:57 +01:00
Victor Stinner 3335447646 Check for PyUnicode_AS_UNICODE() failure 2011-11-21 02:01:41 +01:00
Victor Stinner 53b33e767d UnicodeTranslateError uses the new Unicode API
The index is a character index, not a index in a Py_UNICODE* string.
2011-11-21 01:17:27 +01:00
Victor Stinner a1c03b0a58 Issue #13441: Disable temporary strxfrm() tests on Solaris 2011-11-21 01:02:23 +01:00
Victor Stinner 242b6ea975 (Merge 3.2) Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
Patch written by Arfrever Frehtes Taifersar Arahesis.
2011-11-20 23:10:12 +01:00
Victor Stinner a04b39b261 Close #13401: Skip TestFileTypeW of test_argparse if the current user is root
Patch written by Arfrever Frehtes Taifersar Arahesis.
2011-11-20 23:09:09 +01:00
Victor Stinner da1ddf37c6 UnicodeEncodeError uses the new Unicode API
The index is a character index, not a index in a Py_UNICODE* string.
2011-11-20 22:50:23 +01:00
Victor Stinner 4ead7c7be8 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.
2011-11-20 19:48:36 +01:00
Victor Stinner 2b979bfa3c Use PyUnicode_CompareWithASCIIString() instead of Py_UNICODE_strcmp() to avoid
the deprecate Py_UNICODE type
2011-11-20 19:32:09 +01:00
Victor Stinner 0fc35196bb stringlib: remove unused STRINGLIB_FILL 2011-11-20 19:30:15 +01:00
Victor Stinner e251d6d69d print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize() 2011-11-20 19:20:00 +01:00
Victor Stinner b960b34577 PyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(),
instead of calling the deprecated PyUnicode_EncodeUTF32() function
2011-11-20 19:12:52 +01:00
Victor Stinner 77faf69ca1 _PyUnicode_CheckConsistency() also checks maxchar maximum value,
not only its minimum value
2011-11-20 18:56:05 +01:00
Victor Stinner d5c4022d2a Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros 2011-11-20 18:41:31 +01:00
Victor Stinner 2e9cfadd7c Reuse surrogate macros in UTF-16 decoder 2011-11-20 18:40:27 +01:00
Victor Stinner 9343999597 Fix PyUnicode_CopyCharacters() doc 2011-11-20 18:29:14 +01:00
Victor Stinner ae4f7c8e59 charmap_encoding_error() uses the new Unicode API 2011-11-20 18:28:55 +01:00
Victor Stinner 7c8bbbbb0c Ensure that Py_UCS4 is 32 bits and Py_UCS2 is 16 bits 2011-11-20 18:28:29 +01:00
Victor Stinner 46606ce870 Document new and deprecated Unicode functions 2011-11-20 18:27:55 +01:00
Victor Stinner b4938aaf15 Document PyUnicode_WCHAR_KIND 2011-11-20 18:27:28 +01:00
Victor Stinner ac931b1e5b Use PyUnicode_EncodeCodePage() instead of PyUnicode_EncodeMBCS() with
PyUnicode_AsUnicodeAndSize()
2011-11-20 18:27:03 +01:00
Victor Stinner 22168998f5 charmap encoders uses Py_UCS4, not Py_UNICODE 2011-11-20 17:09:18 +01:00
Éric Araujo 54e26c01b0 Update list of trove classifiers 2011-11-20 16:01:35 +01:00
Petri Lehtinen aadc519ceb Merge branch 3.2 (closes #13338) 2011-11-19 22:04:33 +02:00
Petri Lehtinen 8d40f16a60 Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
This allows compiling extension modules with -Wswitch-enum on gcc.
Initial patch by Floris Bruynooghe.
2011-11-19 22:03:10 +02:00
Mark Dickinson b96172e2cf Issue #9530: Fix undefined behaviour due to signed overflow in testcapi_long.h. 2011-11-19 17:58:15 +00:00
Mark Dickinson 895d181128 Issue #12245 merge. 2011-11-19 16:27:22 +00:00
Mark Dickinson b1e58fe43f Issue #12245: Document sys.float_info.rounds better. 2011-11-19 16:26:45 +00:00
Charles-François Natali e6eabd4345 Issue #13215: multiprocessing.Connection: don't hammer the remote end with
retries in case of ECONNREFUSED.
2011-11-19 09:59:43 +01:00
Antoine Pitrou e532456965 Issue #13393: In TextIOWrapper.read(n), try to read `n` characters as
once rather than limit ourselves to the default chunk size.
2011-11-19 00:39:01 +01:00
Antoine Pitrou f34a0cdc6c Issue #10227: Add an allocation cache for a single slice object.
Patch by Stefan Behnel.
2011-11-18 20:14:34 +01:00
Ezio Melotti 2251a3d233 #13387: merge with 3.2. 2011-11-18 19:01:01 +02:00
Ezio Melotti fabf0275a9 #13387: add note about checking the exact type in assertIsInstance doc. 2011-11-18 18:59:36 +02:00
Ezio Melotti 4a7abe7ca6 #11112: merge with 3.2. 2011-11-18 18:35:53 +02:00