summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (insteadVictor Stinner2010-05-171-1/+3
| | | | of strict) error handler to escape surrogates
* Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a UnicodeVictor Stinner2010-05-151-3/+13
| | | | | | object to Py_FileSystemDefaultEncoding with the "surrogateescape" error handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set, fall back to UTF-8.
* Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for anyVictor Stinner2010-05-151-23/+31
| | | | error handler, not only the default error handler (strict)
* Merged revisions 81037 via svnmerge fromMark Dickinson2010-05-101-33/+39
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81037 | mark.dickinson | 2010-05-09 21:42:09 +0100 (Sun, 09 May 2010) | 1 line Wrap multiline macros in a 'do {} while(0)', for safety. ........
* Merged revisions 81036 via svnmerge fromMark Dickinson2010-05-101-102/+101
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81036 | mark.dickinson | 2010-05-09 21:30:29 +0100 (Sun, 09 May 2010) | 1 line Post-detabification cleanup: whitespace fixes and long line rewraps only. ........
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-0933-30660/+30660
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 80961 via svnmerge fromMark Dickinson2010-05-081-5/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80961 | mark.dickinson | 2010-05-08 09:01:19 +0100 (Sat, 08 May 2010) | 2 lines Issue #8659: Remove redundant ABS calls. Thanks Daniel Stutzbach. ........
* module_repr(): use %U to format the file nameVictor Stinner2010-05-071-5/+15
| | | | Avoid useless encode/decode of the filename
* code_repr(): use %U to format the filenameVictor Stinner2010-05-071-8/+12
| | | | Avoid useless unicode decoding/recoding of the filename.
* Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin2010-05-031-1/+2
| | | | | | | | | | | | | | | | | | http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data race detector that runs on top of valgrind. With this patch, the binaries at http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many but not all of the Python tests. All of regrtest still passes outside of tsan. I've implemented part of the C1x atomic types so that we can explicitly mark variables that are used across threads, and get defined behavior as compilers advance. I've added tsan's client header and implementation to the codebase in dynamic_annotations.{h,c} (docs at http://code.google.com/p/data-race-test/wiki/DynamicAnnotations). Unfortunately, I haven't been able to get helgrind and drd to give sensible error messages, even when I use their client annotations, so I'm not supporting them.
* PyFile_FromFd() uses PyUnicode_DecodeFSDefault() instead ofVictor Stinner2010-04-301-1/+1
| | | | | PyUnicode_FromString() to support surrogates in the filename and use the right encoding
* PyUnicode_DecodeFSDefaultAndSize() uses surrogateescape error handlerVictor Stinner2010-04-301-4/+4
| | | | | | This function is only used to decode Python module filenames, but Python doesn't support surrogates in modules filenames yet. So nobody noticed this minor bug.
* Simplify PyUnicode_FSConverter(): remove reference to PyByteArrayVictor Stinner2010-04-301-9/+3
| | | | PyByteArray is no more supported
* Don't decode/recode the unicode filename in SyntaxError_str()Victor Stinner2010-04-281-20/+34
| | | | | * Rewrite my_basename() to use unicode * Use '%U' format
* condense conditionBenjamin Peterson2010-04-251-4/+1
|
* prevent the dict constructor from accepting non-string keyword args #8419Benjamin Peterson2010-04-241-2/+21
| | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
* Fix my previous commit (r80382) for wide build (unicodeobject.c)Victor Stinner2010-04-221-2/+3
|
* Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producingVictor Stinner2010-04-221-47/+80
| | | | unicode string (eg. backslashreplace)
* Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,Victor Stinner2010-04-221-1/+1
| | | | you have to convert your bytearray filenames to bytes