Amaury Forgeot d'Arc
5e8260b09c
Issue #13727 : Add 3 macros to access PyDateTime_Delta members:
...
PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS,
PyDateTime_DELTA_GET_MICROSECONDS.
Please use them instead of directly accessing PyDateTime_Delta struct members.
2012-01-17 21:31:50 +01:00
Benjamin Peterson
c0beabc2a5
move LINENO define to where it actually belongs
2012-01-16 17:29:05 -05:00
Meador Inge
da05f454e3
Issue #13629 : Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.
2012-01-15 19:31:57 -06:00
Meador Inge
3388060127
Issue #13629 : Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.
2012-01-15 19:15:36 -06:00
Gregory P. Smith
f5b62a9b31
Consolidate the occurrances of the prime used as the multiplier when hashing.
2012-01-14 15:45:13 -08:00
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).
2012-01-14 15:31:34 -08:00
Benjamin Peterson
d5890c8db5
add str.casefold() ( closes #13752 )
2012-01-14 13:23:30 -05:00
Benjamin Peterson
527c622926
make YieldFrom its own distinct from Yield ( closes #13780 )
2012-01-14 08:58:23 -05:00
Nick Coghlan
76e1bb0ef9
Fix indenting
2012-01-14 16:08:08 +10:00
Amaury Forgeot d'Arc
77b1ecf0ad
Silence compilation warnings on Windows
2012-01-13 22:12:37 +01:00
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
2012-01-13 21:43:40 +10:00
Benjamin Peterson
b2bf01d824
use full unicode mappings for upper/lower/title case ( #12736 )
...
Also broaden the category of characters that count as lowercase/uppercase.
2012-01-11 18:17:06 -05:00
Victor Stinner
3fe553160c
Add a new PyUnicode_Fill() function
...
It is faster than the unicode_fill() function which was implemented in
formatter_unicode.c.
2012-01-04 00:33:50 +01:00
Antoine Pitrou
5b62942074
Issue #13577 : Built-in methods and functions now have a __qualname__.
...
Patch by sbt.
2011-12-23 12:40:16 +01:00
Victor Stinner
80bc72d5a2
fix PyCompactUnicodeObject doc (test)
2011-12-22 03:23:10 +01:00
Victor Stinner
52e2cc8604
backout 7876cd49300d: Move PyUnicode_WCHAR_KIND outside PyUnicode_Kind enum
2011-12-19 22:14:45 +01:00
Victor Stinner
0ba5af20c0
Move PyUnicode_WCHAR_KIND outside PyUnicode_Kind enum
2011-12-17 22:18:27 +01:00
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.
2011-12-17 05:47:23 +01:00
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
2011-12-17 04:13:41 +01:00
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.
2011-12-16 23:56:01 +01:00
Antoine Pitrou
093ce9cd8c
Issue #6695 : Full garbage collection runs now clear the freelist of set objects.
...
Initial patch by Matthias Troffaes.
2011-12-16 11:24:27 +01:00
Benjamin Peterson
bfebb7b54a
improve abstract property support ( closes #11610 )
...
Thanks to Darren Dale for patch.
2011-12-15 15:34:02 -05:00
Antoine Pitrou
9d57481f04
Issue #13577 : various kinds of descriptors now have a __qualname__ attribute.
...
Patch by sbt.
2011-12-12 13:47:25 +01:00
Victor Stinner
16e6a80923
PyUnicode_Resize(): warn about canonical representation
...
Call also directly unicode_resize() in unicodeobject.c
2011-12-12 13:24:15 +01:00
Victor Stinner
b0a82a6a7f
Fix PyUnicode_Resize() for compact string: leave the string unchanged on error
...
Fix also PyUnicode_Resize() doc
2011-12-12 13:08:33 +01:00
Victor Stinner
bf6e560d0c
Make PyUnicode_Copy() private => _PyUnicode_Copy()
...
Undocument the function.
Make also decode_utf8_errors() as private (static).
2011-12-12 01:53:47 +01:00
Victor Stinner
7a9105a380
resize_copy() now supports legacy ready strings
2011-12-12 00:13:42 +01:00
Victor Stinner
24c74be9a3
PyUnicode_IS_ASCII() macro ensures that the string is ready
...
It has no sense to check if a not ready string is ASCII or not.
2011-12-12 01:24:20 +01:00
Barry Warsaw
04f6974d84
- Issue #11147 : Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
...
given by Campbell Barton).
2011-12-05 16:50:41 -05:00
Barry Warsaw
9f57135465
- Issue #11147 : Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
...
given by Campbell Barton).
2011-12-05 16:45:02 -05:00
Victor Stinner
551ac95733
Py_UNICODE_HIGH_SURROGATE() and Py_UNICODE_LOW_SURROGATE() macros
...
And use surrogates macros everywhere in unicodeobject.c
2011-11-29 22:58:13 +01:00
Jesus Cea
66f412e4dc
MERGE: Closes issue #13488 : Some old preprocessors have problem with #define not in the first column
2011-11-27 05:17:14 +01:00
Jesus Cea
6d47db31f0
Closes issue #13488 : Some old preprocessors have problem with #define not in the first column
2011-11-27 05:16:22 +01:00
Victor Stinner
0fdfceb782
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.
2011-11-25 22:10:02 +01:00
Antoine Pitrou
86a36b500a
PEP 3155 / issue #13448 : Qualified name for classes and functions.
2011-11-25 18:56:07 +01:00
Antoine Pitrou
6dd381eb62
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.
2011-11-21 21:26:56 +01:00
Antoine Pitrou
ce4a9da705
Issue #13411 : memoryview objects are now hashable when the underlying object is hashable.
2011-11-21 20:46:33 +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
77faf69ca1
_PyUnicode_CheckConsistency() also checks maxchar maximum value,
...
not only its minimum value
2011-11-20 18:56:05 +01:00
Victor Stinner
9343999597
Fix PyUnicode_CopyCharacters() doc
2011-11-20 18:29:14 +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
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
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
Victor Stinner
6f9568bb1f
Fix misused of "PyUnicodeObject" structure name in unicodeobject.h
2011-11-17 00:12:44 +01:00
Antoine Pitrou
9a812cbc89
Issue #13389 : Full garbage collection passes now clear the freelists for
...
list and dict objects. They already cleared other freelists in the
interpreter.
2011-11-15 00:00:12 +01:00
Martin v. Löwis
1db7c13be1
Port encoders from Py_UNICODE API to unicode object API.
2011-11-10 18:24:32 +01:00
Martin v. Löwis
d10759f6ed
Make _PyUnicode_FromId return borrowed references.
...
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
2011-11-07 13:00:05 +01:00
Victor Stinner
e30c0a1014
Fix gdb/libpython.py for not ready Unicode strings
...
_PyUnicode_CheckConsistency() checks also hash and length value for not ready
Unicode strings.
2011-11-04 20:54:05 +01:00
Victor Stinner
7931d9a951
Replace PyUnicodeObject type by PyObject
...
* _PyUnicode_CheckConsistency() now takes a PyObject* instead of void*
* Remove now useless casts to PyObject*
2011-11-04 00:22:48 +01:00