Benjamin Peterson
c6630b9291
fix old titlecase function for extended case chars
14 years ago
Benjamin Peterson
9487c4db82
comment about how flags could be expanded
14 years ago
Benjamin Peterson
ad9c569825
delta encoding of upper/lower/title makes a glorious return ( #12736 )
14 years ago
Gregory P. Smith
63e6c3222f
Consolidate the occurrances of the prime used as the multiplier when hashing
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
14 years ago
Benjamin Peterson
c8d8b8861e
fix possible refleaks if PyUnicode_READY fails
14 years ago
Benjamin Peterson
bac79498c8
always explicitly check for -1 from PyUnicode_READY
14 years ago
Benjamin Peterson
d5890c8db5
add str.casefold() ( closes #13752 )
14 years ago
Nick Coghlan
138f4656e3
Add a separate NEWS entry for a change to PyObject_CallMethod in the PEP 380 patch, and make the private CallMethod variants consistent with the public one
14 years ago
Amaury Forgeot d'Arc
e557da804a
Fix a crash when the return value of a subgenerator is a temporary
object (with a refcount of 1)
14 years ago
Benjamin Peterson
53aa1d7c57
fix possible if unlikely leak
14 years ago
Georg Brandl
ac0675cc01
Small clarification in docstring of dict.update(): the positional argument is not required.
14 years ago
Victor Stinner
bb2e9c477d
Issue #11231 : Fix bytes and bytearray docstrings
Patch written by Brice Berna.
14 years ago
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
14 years ago
Benjamin Peterson
e51757f6de
move do_title to a better place
14 years ago
Benjamin Peterson
821e4cfd01
make fix_decimal_and_space_to_ascii check if it modifies the string
14 years ago
Benjamin Peterson
0c91392fe6
kill capwords implementation which has been disabled since the begining
14 years ago
Benjamin Peterson
21e0da228d
remove some usage of Py_UNICODE_TOUPPER/LOWER
14 years ago
Benjamin Peterson
b2bf01d824
use full unicode mappings for upper/lower/title case ( #12736 )
Also broaden the category of characters that count as lowercase/uppercase.
14 years ago
Antoine Pitrou
94f6fa62bf
Issue #13738 : Simplify implementation of bytes.lower() and bytes.upper().
14 years ago
Victor Stinner
3fe553160c
Add a new PyUnicode_Fill() function
It is faster than the unicode_fill() function which was implemented in
formatter_unicode.c.
14 years ago
Benjamin Peterson
5e458f520c
also decref the right thing
14 years ago
Benjamin Peterson
4c13a4a352
ready the correct string
14 years ago
Benjamin Peterson
22a29708fd
fix some possible refleaks from PyUnicode_READY error conditions
14 years ago
Benjamin Peterson
9ca3ffac94
== -1 is convention
14 years ago
Benjamin Peterson
e157cf1012
make switch more robust
14 years ago
Benjamin Peterson
2199227be4
fix weird indentation
14 years ago
Antoine Pitrou
5b62942074
Issue #13577 : Built-in methods and functions now have a __qualname__.
Patch by sbt.
14 years ago
Benjamin Peterson
c0b95d18fa
4 space indentation
14 years ago
Benjamin Peterson
ead6b53659
fix spacing around switch statements
14 years ago
Victor Stinner
6099a03202
Issue #13624 : Write a specialized UTF-8 encoder to allow more optimization
The main bottleneck was the PyUnicode_READ() macro.
14 years ago
Victor Stinner
73f53b57d1
Optimize str * n for len(str)==1 and UCS-2 or UCS-4
14 years ago
Victor Stinner
f644110816
Issue #13621 : Optimize str.replace(char1, char2)
Use findchar() which is more optimized than a dummy loop using
PyUnicode_READ(). PyUnicode_READ() is a complex and slow macro.
14 years ago
Victor Stinner
f8eac00779
Issue #13623 : Fix a performance regression introduced by issue #12170 in
bytes.find() and handle correctly OverflowError (raise the same ValueError than
the error for -1).
14 years ago
Benjamin Peterson
f2fe7f0881
fix possible NULL dereference
14 years ago
Victor Stinner
2f197078fb
The locale decoder raises a UnicodeDecodeError instead of an OSError
Search the invalid character using mbrtowc().
14 years ago
Victor Stinner
1b57967b96
Issue #13560 : Locale codec functions use the classic "errors" parameter,
instead of surrogateescape
So it would be possible to support more error handlers later.
14 years ago
Victor Stinner
ab59594326
What's New in Python 3.3: complete the deprecation list
Add also FIXMEs in unicodeobject.c
14 years ago
Victor Stinner
1f33f2b0c3
Issue #13560 : os.strerror() now uses the current locale encoding instead of UTF-8
14 years ago
Victor Stinner
f2ea71fcc8
Issue #13560 : Add PyUnicode_EncodeLocale()
* Use PyUnicode_EncodeLocale() in time.strftime() if wcsftime() is not
available
* Document my last changes in Misc/NEWS
14 years ago
Victor Stinner
af02e1c85a
Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()
* 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.
14 years ago
Antoine Pitrou
093ce9cd8c
Issue #6695 : Full garbage collection runs now clear the freelist of set objects.
Initial patch by Matthias Troffaes.
14 years ago
Benjamin Peterson
bfebb7b54a
improve abstract property support ( closes #11610 )
Thanks to Darren Dale for patch.
14 years ago
Antoine Pitrou
e0e2735f41
Fix OSError.__init__ and OSError.__new__ so that each of them can be
overriden and take additional arguments (followup to issue #12555 ).
14 years ago
Antoine Pitrou
2e872082f6
Fix the fix for issue #12149 : it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
14 years ago
Florent Xicluna
aa6c1d240f
Issue #13575 : there is only one class type.
14 years ago
Antoine Pitrou
9d57481f04
Issue #13577 : various kinds of descriptors now have a __qualname__ attribute.
Patch by sbt.
14 years ago
Victor Stinner
16e6a80923
PyUnicode_Resize(): warn about canonical representation
Call also directly unicode_resize() in unicodeobject.c
14 years ago
Victor Stinner
b0a82a6a7f
Fix PyUnicode_Resize() for compact string: leave the string unchanged on error
Fix also PyUnicode_Resize() doc
14 years ago
Victor Stinner
bf6e560d0c
Make PyUnicode_Copy() private => _PyUnicode_Copy()
Undocument the function.
Make also decode_utf8_errors() as private (static).
14 years ago
Victor Stinner
7a9105a380
resize_copy() now supports legacy ready strings
14 years ago