summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
...
* Docstring changes: Specify exceptions raisedAndrew M. Kuchling2008-10-041-3/+6
|
* Docstring change: Specify exception raisedAndrew M. Kuchling2008-10-041-1/+3
|
* Use correct capitalization of NaNAndrew M. Kuchling2008-10-041-2/+2
|
* Mention exception in docstringAndrew M. Kuchling2008-10-031-1/+2
|
* Fixed a couple more C99 comments and one occurence of inline.Christian Heimes2008-10-021-15/+15
|
* Fixed a comment to C89 style as of ↵Christian Heimes2008-10-021-1/+1
| | | | http://drj11.wordpress.com/2008/10/02/python-and-bragging-about-c89/
* #3967: Correct a crash in count() and find() methods of string-like objects.Amaury Forgeot d'Arc2008-09-262-8/+6
| | | | | | | | For example: "".count("xxxx", sys.maxint, 0) Reviewed by Benjamin Peterson. Will port to 2.5 and 3.0.
* #3965: on Windows, open() crashes if the filename or the mode is invalid,Amaury Forgeot d'Arc2008-09-251-4/+11
| | | | | | and if the filename is a unicode string. Reviewed by Martin von Loewis.
* Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.Martin v. Löwis2008-09-251-1/+1
|
* should use macro'ed symbols not directAndrew MacIntyre2008-09-221-3/+3
| | | | | Part of source_os2emx.patch in issue 3868 Reviewed by Amaury Forgeot d'Arc
* Issue #3642: Suppress warning in obmalloc when size_t isMartin v. Löwis2008-09-111-1/+3
| | | | larger than uint. Reverts r65975. Reviewed by Brett Cannon.
* Issue #3811: The Unicode database was updated to 5.1.Martin v. Löwis2008-09-102-758/+921
| | | | Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
* Fix #3634 invalid return value from _weakref.ref(Exception).__init__Benjamin Peterson2008-09-091-1/+1
| | | | Reviewers: Amaury, Antoine, Benjamin
* Fix varname in docstring. #3822.Georg Brandl2008-09-091-2/+2
|
* #3777: long(4.2) returned an int, and broke backward compatibility.Amaury Forgeot d'Arc2008-09-091-1/+8
| | | | | | | the __long__ slot is allowed to return either int or long, but the behaviour of float objects should not change between 2.5 and 2.6. Reviewed by Benjamin Peterson
* Issue #3751: str.rpartition would perform a left-partition when called withAmaury Forgeot d'Arc2008-09-011-1/+1
| | | | | | a unicode argument. will backport.
* #3668: When PyArg_ParseTuple correctly parses a s* format, but raises anAntoine Pitrou2008-08-291-7/+0
| | | | | | | exception afterwards (for a subsequent parameter), the user code will not call PyBuffer_Release() and memory will leak. Reviewed by Amaury Forgeot d'Arc.
* Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as toAntoine Pitrou2008-08-262-80/+136
| | | | | | | | | | match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__ mechanism. In the process, fix a bug where isinstance() and issubclass(), when given a tuple of classes as second argument, were looking up __instancecheck__ / __subclasscheck__ on the tuple rather than on each type object. Reviewed by Benjamin Peterson and Raymond Hettinger.
* generate py3k warnings on __getslice__, __delslice__, and __setslice__Benjamin Peterson2008-08-242-8/+47
| | | | Reviewer: Brett Cannon
* Fix:Neal Norwitz2008-08-242-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | * crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5.
* Silenced compiler warningChristian Heimes2008-08-222-1/+2
| | | | | Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used Reviewed by Benjamin Peterson
* Changed type of numarenas from uint to size_t to silence a GCC warning on ↵Christian Heimes2008-08-221-1/+1
| | | | 64bit OSes. Reviewed by Benjamin Peterson.
* issue 3633: Solaris allows fullwidth Unicode digits in isxdigit, soMark Dickinson2008-08-211-5/+4
| | | | | | | | rewrite float.fromhex to only allow ASCII hex digits on all platforms. (Tests for this are already present, but the test_float failures on Solaris hadn't been noticed before.) Reviewed by Antoine Pitrou.
* Backport of r63826.Eric Smith2008-08-181-6/+42
| | | | | | | | | | | | Optimization of str.format() for cases with str, unicode, int, long, and float arguments. This gives about 30% speed improvement for the simplest (but most common) cases. This patch skips the __format__ dispatch, and also avoids creating an object to hold the format_spec. Unfortunately there's a complication in 2.6 with int, long, and float because they always expect str format_specs. So in the unicode version of this optimization, just check for unicode objects. int, float, long, and str can be added later, if needed.
* Fix a refleak in bytearray.split and bytearray.rsplit, detected byAmaury Forgeot d'Arc2008-08-171-4/+10
| | | | regrtest.py -R:: test_bytes
* Fix memory leak: Always DECREF obj in PyBuffer_Release.Martin v. Löwis2008-08-141-5/+3
|
* Make obj an owned reference in Py_buffer; this checkinMartin v. Löwis2008-08-141-1/+4
| | | | was missing from the patch for #3139.
* Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,Martin v. Löwis2008-08-124-57/+79
| | | | | | | by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*.
* Issue 2235: Py3k warnings are now emitted for classes that will no longer ↵Nick Coghlan2008-08-111-0/+35
| | | | inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
* - Issue #3537: Fix an assertion failure when an empty but presized dictGeorg Brandl2008-08-111-0/+4
| | | | object was stored in the freelist.
* Change the warning emitted for using the buffer() object; memoryview() in 3.0Brett Cannon2008-08-081-2/+1
| | | | is not an equivalent.
* Issue #1481296: (again!) Make conversion of a float NaN to an int orMark Dickinson2008-08-041-2/+4
| | | | | | | long raise ValueError instead of returning 0. Also, change the error message for conversion of an infinity to an integer, replacing 'long' by 'integer', so that it's appropriate for both long(float('inf')) and int(float('inf')).
* Preemptively backport the relevant parts of r65420Antoine Pitrou2008-08-021-1/+1
|
* Correct a crash when two successive unicode allocations fail with a MemoryError:Amaury Forgeot d'Arc2008-07-311-1/+3
| | | | | | | | | the freelist contained half-initialized objects with freed pointers. The comment /* XXX UNREF/NEWREF interface should be more symmetrical */ was copied from tupleobject.c, and appears in some other places. I sign the petition.
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-315-18/+73
|
* backport r64751Benjamin Peterson2008-07-301-0/+2
|
* #2242: utf7 decoding crashes on bogus input on some Windows/MSVC versionsAntoine Pitrou2008-07-251-1/+1
|
* Convert from long to Py_ssize_t.Raymond Hettinger2008-07-241-10/+11
|
* Issue #2620: Overflow checking when allocating or reallocating memoryGregory P. Smith2008-07-221-0/+18
| | | | | | | | was not always being done properly in some python types and extension modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have all been updated to perform better checks and places in the code that would previously leak memory on the error path when such an allocation failed have been fixed.
* Issue2378: pdb would delete free variables when stepping into a class statement.Amaury Forgeot d'Arc2008-07-211-3/+6
| | | | | The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast
* Fix a couple of names in error messages that were wrongNeal Norwitz2008-07-201-2/+2
|
* Backed out r65069, pending fixing it in Windows.Eric Smith2008-07-173-22/+16
|
* Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.Eric Smith2008-07-173-16/+22
|
* Backport part of r65043.Georg Brandl2008-07-161-2/+1
|
* Use _getbytevalue() in init too.Georg Brandl2008-07-161-10/+3
|
* #3156: fix consistency in what type bytearray methods accept as items.Georg Brandl2008-07-161-40/+38
| | | | Also rename confusing "item" parameters to "index".
* Renamed a parameter in calc_number_widths, for consistency with the same ↵Eric Smith2008-07-161-32/+32
| | | | parameter in fill_non_digits.
* Complete issue 3083: add alternate (#) formatting to bin, oct, hex in ↵Eric Smith2008-07-161-30/+68
| | | | str.format().
* Issue #3008: add instance method float.hex and class method float.fromhexMark Dickinson2008-07-151-0/+407
| | | | to convert floats to and from hexadecimal strings respectively.
* Issue 2235: __hash__ is once again inherited by default, but inheritance can ↵Nick Coghlan2008-07-155-50/+35
| | | | be blocked explicitly so that collections.Hashable remains meaningful