summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Merge with 3.2.Georg Brandl2011-12-181-3/+3
|\
| * Small clarification in docstring of dict.update(): the positional argument ↵Georg Brandl2011-12-181-3/+3
| | | | | | | | is not required.
* | Issue #13624: Write a specialized UTF-8 encoder to allow more optimizationVictor Stinner2011-12-182-149/+209
| | | | | | | | The main bottleneck was the PyUnicode_READ() macro.
* | Optimize str * n for len(str)==1 and UCS-2 or UCS-4Victor Stinner2011-12-181-4/+11
| |
* | Issue #13621: Optimize str.replace(char1, char2)Victor Stinner2011-12-181-9/+21
| | | | | | | | | | Use findchar() which is more optimized than a dummy loop using PyUnicode_READ(). PyUnicode_READ() is a complex and slow macro.
* | Issue #13623: Fix a performance regression introduced by issue #12170 inVictor Stinner2011-12-181-10/+17
| | | | | | | | | | bytes.find() and handle correctly OverflowError (raise the same ValueError than the error for -1).
* | Issue #11231: Fix bytes and bytearray docstringsVictor Stinner2011-12-172-10/+9
|\ \ | |/ | | | | Patch written by Brice Berna.
| * Issue #11231: Fix bytes and bytearray docstringsVictor Stinner2011-12-172-10/+9
| | | | | | | | Patch written by Brice Berna.
* | Issue #10951: Fix compiler warnings in timemodule.c and unicodeobject.cVictor Stinner2011-12-171-1/+1
|\ \ | |/ | | | | Thanks Jérémy Anger for the fix.
* | fix possible NULL dereferenceBenjamin Peterson2011-12-171-1/+3
| |
* | The locale decoder raises a UnicodeDecodeError instead of an OSErrorVictor Stinner2011-12-171-17/+86
| | | | | | | | Search the invalid character using mbrtowc().
* | Issue #13560: Locale codec functions use the classic "errors" parameter,Victor Stinner2011-12-171-7/+38
| | | | | | | | | | | | instead of surrogateescape So it would be possible to support more error handlers later.
* | What's New in Python 3.3: complete the deprecation listVictor Stinner2011-12-171-0/+2
| | | | | | | | Add also FIXMEs in unicodeobject.c
* | Issue #13560: os.strerror() now uses the current locale encoding instead of ↵Victor Stinner2011-12-171-8/+20
| | | | | | | | UTF-8
* | Issue #13560: Add PyUnicode_EncodeLocale()Victor Stinner2011-12-171-32/+135
| | | | | | | | | | | | * Use PyUnicode_EncodeLocale() in time.strftime() if wcsftime() is not available * Document my last changes in Misc/NEWS
* | Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()Victor Stinner2011-12-161-17/+78
| | | | | | | | | | | | | | | | | | | | | | * PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string from the current locale encoding * _Py_char2wchar() writes an "error code" in the size argument to indicate if the function failed because of memory allocation failure or because of a decoding error. The function doesn't write the error message directly to stderr. * Fix time.strftime() (if wcsftime() is missing): decode strftime() result from the current locale encoding, not from the filesystem encoding.
* | Issue #6695: Full garbage collection runs now clear the freelist of set objects.Antoine Pitrou2011-12-161-2/+10
| | | | | | | | Initial patch by Matthias Troffaes.
* | improve abstract property support (closes #11610)Benjamin Peterson2011-12-153-3/+105
| | | | | | | | Thanks to Darren Dale for patch.
* | Fix OSError.__init__ and OSError.__new__ so that each of them can beAntoine Pitrou2011-12-151-57/+159
| | | | | | | | overriden and take additional arguments (followup to issue #12555).
* | Fix the fix for issue #12149: it was incorrect, although it had the sideAntoine Pitrou2011-12-151-8/+10
|\ \ | |/ | | | | | | effect of appearing to resolve the issue. Thanks to Mark Shannon for noticing.
| * Fix the fix for issue #12149: it was incorrect, although it had the sideAntoine Pitrou2011-12-151-8/+10
| | | | | | | | | | effect of appearing to resolve the issue. Thanks to Mark Shannon for noticing.
| * Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()Victor Stinner2011-11-221-6/+4
| | | | | | | | | | * Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII() * Remove the unused "e" variable in replace()
* | Issue #13575: there is only one class type.Florent Xicluna2011-12-121-19/+12
| |
* | Issue #13577: various kinds of descriptors now have a __qualname__ attribute.Antoine Pitrou2011-12-121-0/+51
| | | | | | | | Patch by sbt.
* | PyUnicode_Resize(): warn about canonical representationVictor Stinner2011-12-121-12/+13
| | | | | | | | Call also directly unicode_resize() in unicodeobject.c
* | Fix PyUnicode_Resize() for compact string: leave the string unchanged on errorVictor Stinner2011-12-121-20/+9
| | | | | | | | Fix also PyUnicode_Resize() doc
* | Make PyUnicode_Copy() private => _PyUnicode_Copy()Victor Stinner2011-12-122-7/+7
| | | | | | | | | | | | Undocument the function. Make also decode_utf8_errors() as private (static).
* | resize_copy() now supports legacy ready stringsVictor Stinner2011-12-111-13/+15
| |
* | Rewrite PyUnicode_Append(); unicode_modifiable() is more strictVictor Stinner2011-12-111-79/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | * Rename unicode_resizable() to unicode_modifiable() * Rename _PyUnicode_Dirty() to unicode_check_modifiable() to make it clear that the function is private * Inline PyUnicode_Concat() and unicode_append_inplace() in PyUnicode_Append() to simplify the code * unicode_modifiable() return 0 if the hash has been computed or if the string is not an exact unicode string * Remove _PyUnicode_DIRTY(): no need to reset the hash anymore, because if the hash has already been computed, you cannot modify a string inplace anymore * PyUnicode_Concat() checks for integer overflow
* | Create unicode_result_unchanged() subfunctionVictor Stinner2011-12-111-69/+48
| |
* | Fix fixup() for unchanged unicode subtypeVictor Stinner2011-12-111-33/+33
| | | | | | | | If maxchar_new == 0 and self is a unicode subtype, return u instead of duplicating u.
* | unicode_fromascii() doesn't check string content twice in debug modeVictor Stinner2011-12-111-6/+3
| | | | | | | | _PyUnicode_CheckConsistency() also checks string content.
* | Call directly PyUnicode_DecodeUTF8Stateful() instead of PyUnicode_DecodeUTF8()Victor Stinner2011-12-111-33/+14
| | | | | | | | | | | | | | | | * Remove micro-optimization from PyUnicode_FromStringAndSize(): PyUnicode_DecodeUTF8Stateful() has already these optimizations (for size=0 and one ascii char). * Rename utf8_max_char_size_and_char_count() to utf8_scanner(), and remove an useless variable
* | Use directly unicode_empty instead of PyUnicode_New(0, 0)Victor Stinner2011-12-111-6/+12
| |
* | Move the slowest UTF-8 decoder to its own subfunctionVictor Stinner2011-12-111-128/+98
| | | | | | | | | | | | | | * Create decode_utf8_errors() * Reuse unicode_fromascii() * decode_utf8_errors() doesn't refit at the beginning * Remove refit_partial_string(), use unicode_adjust_maxchar() instead
* | Fix error handling in resize_compact()Victor Stinner2011-12-111-5/+9
| |
* | PyUnicode_FromWideChar() and PyUnicode_FromUnicode() raise a ValueError if aVictor Stinner2011-12-081-33/+34
| | | | | | | | character in not in range [U+0000; U+10ffff].
* | Issue #13503: Use a more efficient reduction format for bytearrays withAntoine Pitrou2011-12-051-10/+42
| | | | | | | | | | | | | | pickle protocol >= 3. The old reduction format is kept with older protocols in order to allow unpickling under Python 2. Patch by Irmen de Jong.
* | Fix PyObject_Repr(): don't call PyUnicode_READY() if res is NULLVictor Stinner2011-12-011-1/+3
| |
* | Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)Victor Stinner2011-12-011-1/+1
| | | | | | | | Create an empty string with the new Unicode API.
* | PyObject_Repr() ensures that the result is a ready Unicode stringVictor Stinner2011-12-011-0/+8
| | | | | | | | | | And PyObject_Str() and PyObject_Repr() don't make strings ready in debug mode to ensure that the caller makes the string ready before using it.
* | Py_UNICODE_HIGH_SURROGATE() and Py_UNICODE_LOW_SURROGATE() macrosVictor Stinner2011-11-291-26/+19
| | | | | | | | And use surrogates macros everywhere in unicodeobject.c
* | Merge headsAntoine Pitrou2011-11-263-118/+113
|\ \
| * | Close #13093: PyUnicode_EncodeDecimal() doesn't support error handlersVictor Stinner2011-11-251-113/+18
| | | | | | | | | | | | | | | different than "strict" anymore. The caller was unable to compute the size of the output buffer: it depends on the error handler.
| * | PEP 3155 / issue #13448: Qualified name for classes and functions.Antoine Pitrou2011-11-252-5/+95
| | |
* | | Better resolution for issue #11849: Ensure that free()d memory arenas are ↵Antoine Pitrou2011-11-261-15/+22
|/ / | | | | | | | | | | really released on POSIX systems supporting anonymous memory mappings. Patch by Charles-François Natali.
* | and back to the "magic" formula (with a comment) it isBenjamin Peterson2011-11-231-15/+3
| |
* | cave to those who like readable codeBenjamin Peterson2011-11-231-1/+15
| |
* | fix compiler warning by implementing this more cleverlyBenjamin Peterson2011-11-221-6/+1
| |
* | find_maxchar_surrogates() reuses surrogate macrosVictor Stinner2011-11-221-4/+4
| |