summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Issue 8436: set.__init__ accepts keyword argsRaymond Hettinger2010-04-181-0/+2
|
* Issue 8420: Fix ref counting problem in set_repr().Raymond Hettinger2010-04-181-3/+1
|
* Merged revisions 80129 via svnmerge fromBenjamin Peterson2010-04-161-2/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80129 | benjamin.peterson | 2010-04-16 17:52:44 -0500 (Fri, 16 Apr 2010) | 1 line tiny simplification ........
* Merged revisions 80126 via svnmerge fromBenjamin Peterson2010-04-162-12/+18
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line have a clear error when passing something > sys.maxsize to bytearray ........
* Merged revisions 79885 via svnmerge fromStefan Krah2010-04-071-7/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79885 | stefan.krah | 2010-04-07 10:24:44 +0200 (Wed, 07 Apr 2010) | 1 line Issue #8328: Silence Visual Studio warnings. ........
* Merged revisions 79856 via svnmerge fromMark Dickinson2010-04-061-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79856 | mark.dickinson | 2010-04-06 19:58:54 +0100 (Tue, 06 Apr 2010) | 1 line Silence a 'comparison between signed and unsigned integer expressions' gcc warning. ........
* Merged revisions 79843-79844 via svnmerge fromMark Dickinson2010-04-061-14/+6
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79843 | mark.dickinson | 2010-04-06 17:46:09 +0100 (Tue, 06 Apr 2010) | 4 lines Issue #8259: Get rid of 'outrageous left shift count' error when left-shifting an integer by more than 2**31 on a 64-bit machine. Also convert shift counts to a Py_ssize_t instead of a C long. ........ r79844 | mark.dickinson | 2010-04-06 17:47:55 +0100 (Tue, 06 Apr 2010) | 1 line Misc/NEWS entry for r79843. ........
* Merged revisions 79809 via svnmerge fromMark Dickinson2010-04-061-3/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79809 | mark.dickinson | 2010-04-05 19:54:51 +0100 (Mon, 05 Apr 2010) | 1 line Use a better NaN test in _Py_HashDouble as well. ........
* Merged revisions 79804 via svnmerge fromMark Dickinson2010-04-051-3/+3
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79804 | mark.dickinson | 2010-04-05 19:07:51 +0100 (Mon, 05 Apr 2010) | 5 lines Use a more robust infinity check in _Py_HashDouble. This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.) ........
* Merged revisions 79494,79496 via svnmerge fromFlorent Xicluna2010-03-302-6/+11
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79494 | florent.xicluna | 2010-03-30 10:24:06 +0200 (mar, 30 mar 2010) | 2 lines #7643: Unicode codepoints VT (0x0B) and FF (0x0C) are linebreaks according to Unicode Standard Annex #14. ........ r79496 | florent.xicluna | 2010-03-30 18:29:03 +0200 (mar, 30 mar 2010) | 2 lines Highlight the change of behavior related to r79494. Now VT and FF are linebreaks. ........
* Merged revisions 79278,79280 via svnmerge fromVictor Stinner2010-03-221-1/+1
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines Issue #1583863: An unicode subclass can now override the __str__ method ........ r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines Fix the NEWS about my last commit: an unicode subclass can now override the __unicode__ method (and not the __str__ method). Simplify also the testcase. ........
* Fixed a failure in test_bigmem.Florent Xicluna2010-03-191-961/+1192
| | | | | | | | | | | Merged revision 79059 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79059 | florent.xicluna | 2010-03-18 22:50:06 +0100 (jeu, 18 mar 2010) | 2 lines Issue #8024: Update the Unicode database to 5.2 ........
* Remove out-of-date comment about making ints and longs hash equal.Mark Dickinson2010-03-191-3/+0
|
* Revert Unicode UCD 5.2 upgrade in 3.x. It broke repr() for unicode objects, ↵Florent Xicluna2010-03-191-1192/+961
| | | | and gave failures in test_bigmem. Revert 79062, 79065 and 79083.
* Merged revisions 79060 via svnmerge fromCollin Winter2010-03-181-1/+4
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79060 | collin.winter | 2010-03-18 14:54:01 -0700 (Thu, 18 Mar 2010) | 4 lines Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT. Patch by Reid Kleckner! ........
* Merged revisions 79059 via svnmerge fromFlorent Xicluna2010-03-181-961/+1192
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79059 | florent.xicluna | 2010-03-18 22:50:06 +0100 (jeu, 18 mar 2010) | 2 lines Issue #8024: Update the Unicode database to 5.2 ........
* * Fix the refcount leak in _PySequence_BytesToCharpArray from r78946.Gregory P. Smith2010-03-151-1/+4
| | | | | * Also fixes a potential extra DECREF of an arg in the error case within _posixsubprocess.fork_exec() by not reusing the process_args variable.
* * Replaces the internals of the subprocess module from fork through exec onGregory P. Smith2010-03-141-0/+60
| | | | | | | | | | | | | | | POSIX systems with a C extension module. This is required in order for the subprocess module to be made thread safe. The pure python implementation is retained so that it can continue to be used if for some reason the _posixsubprocess extension module is not available. The unittest executes tests on both code paths to guarantee compatibility. * Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h. Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
* Issue #8014: Fix PyLong_As<c-integer-type> methods not to produce anMark Dickinson2010-03-131-5/+20
| | | | | internal error on non-integer input: they now raise TypeError instead. This is needed for attributes declared via PyMemberDefs.
* Issue #7845: Make 1j.__le__(2j) return NotImplemented rather than raising ↵Mark Dickinson2010-03-131-4/+2
| | | | TypeError.
* Merged revisions 78886 via svnmerge fromVictor Stinner2010-03-131-1/+15
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78886 | victor.stinner | 2010-03-13 01:13:22 +0100 (sam., 13 mars 2010) | 2 lines Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set. ........
* Issue #6697: catch _PyUnicode_AsString() errors in getattr() and setattr()Victor Stinner2010-03-121-5/+12
| | | | builtin functions.
* Issue #6697: use %U format instead of _PyUnicode_AsString(), becauseVictor Stinner2010-03-122-6/+11
| | | | | | _PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*.
* Merged revisions 78515-78516,78522 via svnmerge fromEzio Melotti2010-03-014-12/+14
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. ........ r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line The set types can also be called without arguments. ........ r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line #8030: more docstring fix for builtin types. ........
* Update a comment with more details.Gregory P. Smith2010-02-271-1/+2
|
* plug reference leakBenjamin Peterson2010-02-251-1/+1
|
* Merged revisions 78418 via svnmerge fromEric Smith2010-02-241-34/+79
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78418 | eric.smith | 2010-02-24 09:15:36 -0500 (Wed, 24 Feb 2010) | 1 line Issue #7309: Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. ........
* Merged revisions 78349 via svnmerge fromEric Smith2010-02-231-4/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78349 | eric.smith | 2010-02-22 19:11:16 -0500 (Mon, 22 Feb 2010) | 1 line Issue #6902: Fix problem with built-in types format incorrectly with 0 padding. ........
* Merged revisions 78329 via svnmerge fromEric Smith2010-02-221-10/+40
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78329 | eric.smith | 2010-02-22 13:33:47 -0500 (Mon, 22 Feb 2010) | 1 line Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. ........
* Merged revisions 78319 via svnmerge fromEzio Melotti2010-02-222-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78319 | ezio.melotti | 2010-02-22 18:30:58 +0200 (Mon, 22 Feb 2010) | 1 line #7482: clarify error message in case of division by zero of float and complex numbers. ........
* Merged revisions 78183-78184 via svnmerge fromMark Dickinson2010-02-142-11/+13
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78183 | mark.dickinson | 2010-02-14 12:16:43 +0000 (Sun, 14 Feb 2010) | 1 line Silence some 'comparison between signed and unsigned' compiler warnings. ........ r78184 | mark.dickinson | 2010-02-14 12:31:26 +0000 (Sun, 14 Feb 2010) | 1 line Silence more compiler warnings; fix an instance of potential undefined behaviour from signed overflow. ........
* Merged revisions ↵Benjamin Peterson2010-02-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done partially before. Also add a comment describing how this might have to work with different versions of the interpreter. ........ r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line Fixed typo ........ r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line #7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such. ........ r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line Add note about usage of STRINGLIB_EMPTY. ........ r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line Fix internal reference. ........ r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines data descriptors do not override the class dictionary if __get__ is not defined Adjust documentation and add a test to verify this behavior. See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for discussion. ........ r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines Do not compile stubs for the sha2 series hashes in the openssl hashlib module when the openssl version is too old to support them. That leads both compiled code bloat and to unittests attempting to test implementations that don't exist for comparison purposes on such platforms. ........ r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line Add two more test_strtod test values. ........ r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line #7762: fix refcount annotation of PyUnicode_Tailmatch(). ........ r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line #7725: fix referencing issue. ........ r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line mention from_float() in error message ........ r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line #7802: fix invalid example (heh). ........ r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines Fix-up ftplib documentation: move exception descriptions to toplevel, not inside a class remove attribution in "versionadded" spell and grammar check docstring of FTP_TLS ........ r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line Minor modification to unittest documentation. ........
* Merged revisions 77916 via svnmerge fromAntoine Pitrou2010-02-021-7/+5
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77916 | antoine.pitrou | 2010-02-02 23:36:17 +0100 (mar., 02 févr. 2010) | 4 lines Issue #7385: Fix a crash in `MemoryView_FromObject` when `PyObject_GetBuffer` fails. Patch by Florent Xicluna. ........
* Move docstrings for long.to_bytes and long.from_bytes after the ↵Mark Dickinson2010-01-301-27/+27
| | | | corresponding functions.
* Merged revisions 77842 via svnmerge fromMark Dickinson2010-01-301-0/+96
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77842 | mark.dickinson | 2010-01-30 10:08:33 +0000 (Sat, 30 Jan 2010) | 4 lines Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a long long variant of PyLong_AsLongAndOverflow. Patch by Case Van Horsen. ........
* Merged revisions 77821 via svnmerge fromMark Dickinson2010-01-292-2/+4
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77821 | mark.dickinson | 2010-01-29 17:11:39 +0000 (Fri, 29 Jan 2010) | 3 lines Issue #7788: Fix a crash produced by deleting a list slice with huge step value. Patch by Marcin Bachry. ........
* Merged revisions 77743 via svnmerge fromEzio Melotti2010-01-253-3/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77743 | ezio.melotti | 2010-01-25 13:24:37 +0200 (Mon, 25 Jan 2010) | 1 line #7775: fixed docstring for rpartition ........
* Merged revisions 77573 via svnmerge fromAntoine Pitrou2010-01-171-14/+3
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77573 | antoine.pitrou | 2010-01-17 13:26:20 +0100 (dim., 17 janv. 2010) | 6 lines Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could crash in many places because of the PyByteArray_AS_STRING() macro returning NULL. The macro now returns a statically allocated empty string instead. ........