summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Revert r83395, it introduces test failures and is not necessary anyway since ↵Georg Brandl2010-08-011-2/+2
| | | | we now have to nul-terminate the string anyway.
* Issue #9416: Fix some issues with complex formatting where theMark Dickinson2010-08-011-4/+8
| | | | | | | output with no type specifier failed to match the str output: - format(complex(-0.0, 2.0), '-') omitted the real part from the output, - format(complex(0.0, 2.0), '-') included a sign and parentheses.
* #8821: do not rely on Unicode strings being terminated with a \u0000, rather ↵Georg Brandl2010-08-011-2/+2
| | | | explicitly check range before looking for a second surrogate character.
* Use Py_CLEAR().Georg Brandl2010-07-291-4/+2
|
* Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.Antoine Pitrou2010-07-271-13/+2
|
* revert unintended changesBenjamin Peterson2010-07-201-1/+0
|
* move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson2010-07-201-0/+1
|
* Sub-issue of #9036: Fix incorrect use of Py_CHARMASK.Stefan Krah2010-07-191-1/+1
|
* Issue #7616: Fix copying of overlapping memoryview slices with the IntelAntoine Pitrou2010-07-111-11/+3
| | | | compiler.
* remove unneeded error checkBenjamin Peterson2010-07-111-8/+0
|
* Silence gcc warning. (In function 'bytearray_init': warning: 'value' may be ↵Mark Dickinson2010-07-091-0/+2
| | | | used uninitialized in this function).
* fix repr of complicated structseqs #9206Benjamin Peterson2010-07-081-2/+20
|
* make struct sequences subclass tuple; kill lots of codeBenjamin Peterson2010-07-071-207/+18
| | | | This fixes #8413.
* Style nit.Mark Dickinson2010-07-061-1/+1
|
* cleanup basicsize logic #3268Benjamin Peterson2010-07-051-4/+2
|
* Fix the docstrings of the capitalize method.Senthil Kumaran2010-07-052-2/+3
|
* Update comment about surrogates.Ezio Melotti2010-07-031-5/+5
|
* Merged revisions 82447 via svnmerge fromBenjamin Peterson2010-07-021-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82447 | benjamin.peterson | 2010-07-02 14:41:39 -0500 (Fri, 02 Jul 2010) | 1 line add space ........
* Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.Ezio Melotti2010-07-011-56/+56
| | | | | | | | | | | | | 1) #8271: when a byte sequence is invalid, only the start byte and all the valid continuation bytes are now replaced by U+FFFD, instead of replacing the number of bytes specified by the start byte. See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes in behavior); 3) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 4) Add an extensive set of tests in test_unicode; 5) Fix test_codeccallbacks because it was failing after this change.
* update error messageBenjamin Peterson2010-06-281-2/+1
|
* Merged revisions 82317 via svnmerge fromBenjamin Peterson2010-06-281-16/+12
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82317 | benjamin.peterson | 2010-06-27 21:58:25 -0500 (Sun, 27 Jun 2010) | 1 line remove unused last argument to property_copy ........
* Merged revisions 81465-81466,81468,81679,81735,81760,81868,82183 via ↵Benjamin Peterson2010-06-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81465 | georg.brandl | 2010-05-22 06:29:19 -0500 (Sat, 22 May 2010) | 2 lines Issue #3924: Ignore cookies with invalid "version" field in cookielib. ........ r81466 | georg.brandl | 2010-05-22 06:31:16 -0500 (Sat, 22 May 2010) | 1 line Underscore the name of an internal utility function. ........ r81468 | georg.brandl | 2010-05-22 06:43:25 -0500 (Sat, 22 May 2010) | 1 line #8635: document enumerate() start parameter in docstring. ........ r81679 | benjamin.peterson | 2010-06-03 16:21:03 -0500 (Thu, 03 Jun 2010) | 1 line use a set for membership testing ........ r81735 | michael.foord | 2010-06-05 06:46:59 -0500 (Sat, 05 Jun 2010) | 1 line Extract error message truncating into a method (unittest.TestCase._truncateMessage). ........ r81760 | michael.foord | 2010-06-05 14:38:42 -0500 (Sat, 05 Jun 2010) | 1 line Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error. ........ r81868 | benjamin.peterson | 2010-06-09 14:45:04 -0500 (Wed, 09 Jun 2010) | 1 line fix code formatting ........ r82183 | benjamin.peterson | 2010-06-23 15:29:26 -0500 (Wed, 23 Jun 2010) | 1 line cpython only gc tests ........
* Issue #9089: Remove references to intobject.c and intobject.h from comments.Mark Dickinson2010-06-272-2/+17
|
* #9078: fix some Unicode C API descriptions, in comments and docs.Georg Brandl2010-06-271-1/+1
|
* Merged revisions 82248 via svnmerge fromEzio Melotti2010-06-261-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82248 | ezio.melotti | 2010-06-26 21:44:42 +0300 (Sat, 26 Jun 2010) | 1 line Fix extra space. ........
* Merged revisions 82157 via svnmerge fromBenjamin Peterson2010-06-221-3/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82157 | benjamin.peterson | 2010-06-22 14:16:37 -0500 (Tue, 22 Jun 2010) | 1 line remove INT_MAX assertions; they can fail with large Py_ssize_t #9058 ........
* Issue #850997: mbcs encoding (Windows only) handles errors argument: strictVictor Stinner2010-06-161-38/+125
| | | | | mode raises unicode errors. The encoder only supports "strict" and "replace" error handlers, the decoder only supports "strict" and "ignore" error handlers.
* Silence 'unused variable' gcc warning. Patch by Éric Araujo.Mark Dickinson2010-06-121-1/+2
|
* Issue #8969: On Windows, use mbcs codec in strict mode to encode and decodeVictor Stinner2010-06-111-4/+10
| | | | filenames and enable os.fsencode().
* Merged revisions 81907 via svnmerge fromAntoine Pitrou2010-06-111-19/+21
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81907 | antoine.pitrou | 2010-06-11 23:42:26 +0200 (ven., 11 juin 2010) | 5 lines Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash the interpreter with characters outside the Basic Multilingual Plane (higher than 0x10000). ........
* Fix r81869: ISO-8859-15 was seen as an alias to ISO-8859-1Victor Stinner2010-06-101-39/+45
| | | | Don't use normalize_encoding() result if it is truncated.
* Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() toVictor Stinner2010-06-101-18/+31
| | | | | enable shortcuts for upper case encoding name. Add also a shortcut for "iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode().
* Merged revisions 81860 via svnmerge fromAntoine Pitrou2010-06-092-51/+51
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81860 | antoine.pitrou | 2010-06-09 18:24:00 +0200 (mer., 09 juin 2010) | 3 lines Issue #8930: fix some C code indentation ........
* Merged revisions 81824 via svnmerge fromBenjamin Peterson2010-06-071-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81824 | benjamin.peterson | 2010-06-07 17:32:44 -0500 (Mon, 07 Jun 2010) | 1 line remove extra byte and fix comment ........
* Merged revisions 81820 via svnmerge fromBenjamin Peterson2010-06-071-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line correctly overflow when indexes are too large ........
* Merged revisions 81813 via svnmerge fromBenjamin Peterson2010-06-071-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81813 | benjamin.peterson | 2010-06-07 16:37:09 -0500 (Mon, 07 Jun 2010) | 2 lines locale grouping strings should end in '\0' ........
* Issue #8848: U / U# formats of Py_BuildValue() are just alias to s / s#Victor Stinner2010-06-071-2/+2
|
* Fix naming inconsistency.Mark Dickinson2010-06-071-2/+2
|
* Merged revisions 81712 via svnmerge fromBenjamin Peterson2010-06-051-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81712 | benjamin.peterson | 2010-06-04 21:07:01 -0500 (Fri, 04 Jun 2010) | 1 line _PyObject_LookupSpecial returns a new reference ........
* Merged revisions 81709-81710 via svnmerge fromBenjamin Peterson2010-06-051-10/+2
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81709 | benjamin.peterson | 2010-06-04 19:56:46 -0500 (Fri, 04 Jun 2010) | 1 line implement object.__format__ with PyObject_Format ........ r81710 | benjamin.peterson | 2010-06-04 20:00:10 -0500 (Fri, 04 Jun 2010) | 1 line fix ref counting ........
* Merged revisions 81706-81707 via svnmerge fromBenjamin Peterson2010-06-051-27/+15
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81706 | benjamin.peterson | 2010-06-04 19:32:50 -0500 (Fri, 04 Jun 2010) | 1 line properly lookup the __format__ special method ........ r81707 | benjamin.peterson | 2010-06-04 19:38:22 -0500 (Fri, 04 Jun 2010) | 1 line remove PyType_Ready call; float should be initialized in interpreter startup ........
* Issue #2844: Make int('42', n) consistently raise ValueError forMark Dickinson2010-05-261-9/+20
| | | | invalid integers n (including n = -909).
* Issue #8817: Expose round-to-nearest variant of divmod in _PyLong_Divmod_NearMark Dickinson2010-05-261-111/+140
| | | | for use by the datetime module; also refactor long_round to use this function.
* Issue #8188: Introduce a new scheme for computing hashes of numbersMark Dickinson2010-05-234-74/+145
| | | | | | (instances of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it easy to maintain the invariant that hash(x) == hash(y) whenever x and y have equal value.
* Issue #8749: remove unused code in Objects/object.c. Thanks Yaniv Aknin.Mark Dickinson2010-05-221-24/+0
|
* Issue #8748: Fix two issues with comparisons between complex and integerMark Dickinson2010-05-211-8/+44
| | | | | | | | | | objects. (1) The comparison could incorrectly return True in some cases (2**53+1 == complex(2**53) == 2**53), breaking transivity of equality. (2) The comparison raised an OverflowError for large integers, leading to unpredictable exceptions when combining integers and complex objects in sets or dicts. Patch by Meador Inge.
* Ooops, add missing ";" in my previous commit (r81324, typeobject.c)Victor Stinner2010-05-191-2/+2
| | | | It's time to go to bed...
* Issue #6697: Check that _PyUnicode_AsString() result is not NULL in typeobjectVictor Stinner2010-05-191-2/+12
| | | | | Type name and slots are already checked for surrogates somewhere else, but it's better to ensure that the result is not NULL.
* Issue #6697: Fix a crash if a module attribute name contains a surrogateVictor Stinner2010-05-191-8/+20
|
* Fix refleak in internal_print() introduced by myself in r81251Victor Stinner2010-05-171-0/+1
| | | | | | _PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is destroyed.