summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bugfix for people executing test_all to run the test suite. (call theGregory P. Smith2004-03-161-1/+1
| | | | correct function)
* fixes SF bug 914019 - DB.has_key was not honoring its txn argumentGregory P. Smith2004-03-161-2/+2
|
* 1. Make builtin foreground Royal Purple instead of Barney Purple.Kurt B. Kaiser2004-03-162-27/+32
| | | | | | | 2. Touch up help.txt M config-highlight.def M help.txt
* Fix typos and add some elaborationsRaymond Hettinger2004-03-151-4/+9
|
* Port test_binascii.py to PyUnit and enhance tests.Walter Dörwald2004-03-152-152/+149
| | | | | Code coverage for binascii.c is at 92%. From SF patch #736962.
* Revert last change. Found an application that was worse off with resizeRaymond Hettinger2004-03-151-13/+10
| | | | | exact turned on. The tiny space savings wasn't worth the additional time and code.
* 1. Bug in Patch 805830 fixed by Nigel RoweKurt B. Kaiser2004-03-152-22/+26
| | | | | | | | 2. Convert 1/0 to True/False 3. Fix a couple of long lines M ColorDelegator.py M NEWS.txt
* Eliminate an unnecessary test on a common code path.Raymond Hettinger2004-03-151-3/+1
|
* Add missing docstrings.Raymond Hettinger2004-03-141-0/+67
|
* list_resize() now has an "exact" option for bypassing the overallocationRaymond Hettinger2004-03-141-10/+13
| | | | | | | | | | | | | | | | | | scheme in situations that likely won't benefit from it. This further improves memory utilization from Py2.3 which always over-allocates except for PyList_New(). Situations expected to benefit from over-allocation: list.insert(), list.pop(), list.append(), and list.extend() Situations deemed unlikely to benefit: list_inplace_repeat, list_ass_slice, list_ass_subscript The most gray area was for listextend_internal() which only runs when the argument is a list or a tuple. This could be viewed as a one-time fixed length addition or it could be viewed as wrapping a series of appends. I left its over-allocation turned on but could be convinced otherwise.
* SF feature request #686323: Minor array module enhancementsRaymond Hettinger2004-03-144-14/+51
| | | | | | | array.extend() now accepts iterable arguments implements as a series of appends. Besides being a user convenience and matching the behavior for lists, this the saves memory and cycles that would be used to create a temporary array object.
* Update the array overallocation scheme to match the approach used forRaymond Hettinger2004-03-142-62/+79
| | | | | | | | lists. Speeds append() operations and reduces memory requirements (because of more conservative overallocation). Paves the way for the feature request for array.extend() to support arbitrary iterable arguments.
* Two issues spotted by Ronald OUssoren:Jack Jansen2004-03-134-3/+2234
| | | | | | - there were no accessor functions for the global per-database fields - packages and their dependencies were installed in order in stead of in reverse order.
* Don't use "dict" as a variable, it shadows the builtin. Spotted byJack Jansen2004-03-131-13/+13
| | | | Bob Ippolito.
* compile.h and eval.h weren't being included which kept a fair bit of theSkip Montanaro2004-03-131-0/+3
| | | | public API from being exposed by simply including Python.h (as recommended).
* Force option should be applied to a single package, not recursivelyJack Jansen2004-03-131-1/+1
| | | | to its dependencies. Fixes #733819.
* SF patch #906501: Fix typos in pystate.h commentsRaymond Hettinger2004-03-131-2/+2
| | | | (Contributed by Greg Chapman.)
* SF patch #911431: robot.txt must be robots.txtRaymond Hettinger2004-03-132-3/+3
| | | | (Contributed by George Yoshida.)
* SF bug #910986: copy.copy fails for array.arrayRaymond Hettinger2004-03-133-0/+24
| | | | Added support for the copy module.
* Make PySequence_Fast_ITEMS public. (Thanks Skip.)Raymond Hettinger2004-03-122-4/+4
|
* LIST_APPEND is predicably followed by JUMP_ABSOLUTE.Raymond Hettinger2004-03-121-1/+5
| | | | Reduces loop overhead by an additional 10%.
* * Eliminate duplicate call to PyObject_Size().Raymond Hettinger2004-03-121-3/+3
| | | | | | | (Spotted by Michael Hudson.) * Now that "selflen" is no longer inside a loop, it should not be a register variable.
* Move the code for BREAK and CONTINUE_LOOP to be near FOR_ITER.Raymond Hettinger2004-03-121-9/+9
| | | | | Makes it more likely that all loop operations are in the cache at the same time.
* Speedup for-loops by inlining PyIter_Next(). Saves duplicate testsRaymond Hettinger2004-03-121-8/+10
| | | | | and a function call resulting in a 15% reduction of total loop overhead (as measured by timeit.Timer('pass')).
* Use a new macro, PySequence_Fast_ITEMS to factor out code common toRaymond Hettinger2004-03-124-16/+19
| | | | | three recent optimizations. Aside from reducing code volume, it increases readability.
* - Added a downloader using urllib2 in stead of curl, based on codeJack Jansen2004-03-111-51/+137
| | | | | | | donated by Kevin Ollivier. This is now the default downloader. - Added a watcher mechanism, whereby downloaders and unpackers (and, later builders) can give status feedback to the user. When running pimp as a command line tool in verbose mode print this output.
* Now that list.extend() is at the root of many list operations, it becomesRaymond Hettinger2004-03-111-3/+9
| | | | | | | worth it to in-line the call to PyIter_Next(). Saves another 15% on most list operations that acceptable a general iterable argument (such as the list constructor).
* Eliminate a big block of duplicate code in PySequence_List() byRaymond Hettinger2004-03-113-54/+13
| | | | exposing _PyList_Extend().
* list_inplace_concat() is now expressed in terms of list_extend() whichRaymond Hettinger2004-03-111-14/+13
| | | | | | | | avoids creating an intermediate tuple for iterable arguments other than lists or tuples. In other words, a+=b no longer requires extra memory when b is not a list or tuple. The list and tuple cases are unchanged.
* Make buffer objects based on mutable objects (like array) safe.Neil Schemenauer2004-03-112-82/+154
|
* Document one of the many problems with the buffer object.Neil Schemenauer2004-03-111-2/+9
|
* Rename static functions, they should not have the _Py prefix.Neil Schemenauer2004-03-111-11/+10
|
* Make test_coercion.py less sensitive to platform fp quirks. ClosesNeil Schemenauer2004-03-102-333/+348
| | | | SF bug #678265.
* Use memcpy() instead of memmove() when the buffers are known to be distinct.Raymond Hettinger2004-03-101-2/+2
|
* Tidied up the implementations of reversed (including the custom onesRaymond Hettinger2004-03-104-28/+58
| | | | | | | | | | | | | | | | | for xrange and list objects). * list.__reversed__ now checks the length of the sequence object before calling PyList_GET_ITEM() because the mutable could have changed length. * all three implementations are now tranparent with respect to length and maintain the invariant len(it) == len(list(it)) even when the underlying sequence mutates. * __builtin__.reversed() now frees the underlying sequence as soon as the iterator is exhausted. * the code paths were rearranged so that the most common paths do not require a jump.
* Eliminate the double reverse option. It's only use caseRaymond Hettinger2004-03-102-17/+2
| | | | was academic and it was potentially confusing to use.
* Optimize inner loops for subscript, repeat, and concat.Raymond Hettinger2004-03-092-36/+59
|
* Optimize slice assignments.Raymond Hettinger2004-03-091-16/+17
| | | | | | | | | | | | | * Replace sprintf message with a constant message string -- this error message ran on every invocation except straight deletions but it was only needed when the rhs was not iterable. The message was also out-of-date and did not reflect that iterable arguments were allowed. * For inner loops that do not make ref count adjustments, use memmove() for fast copying and better readability. * For inner loops that do make ref count adjustments, speed them up by factoring out the constant structure reference and using vitem[] instead.
* SF Patch #912462: Relocate \end tag to the right place.Hye-Shik Chang2004-03-091-1/+2
| | | | (Submitted by George Yoshida)
* Refactor and optimize code for UNPACK_SEQUENCE.Raymond Hettinger2004-03-081-27/+13
| | | | | | | | | | * Defer error handling for wrong number of arguments to the unpack_iterable() function. Cuts the code size almost in half. * Replace function calls to PyList_Size() and PyTuple_Size() with their smaller and faster macro counterparts. * Move the constant structure references outside of the inner loops.
* Remove calls to currentThread() in _Condition methods that were side-effect.Brett Cannon2004-03-081-2/+0
| | | | | | | | | Side-effects were deemed unnecessary and were causing problems at shutdown time when threads were catching exceptions at start time and then triggering exceptions trying to call currentThread() after gc'ed. Masked the initial exception which was deemed bad. Fixes bug #754449 .
* The copy module now handles sets directly. The __copy__ methods are noRaymond Hettinger2004-03-081-4/+0
| | | | longer needed.
* SF patch #907403: Improvements to cStringIO.writelines()Raymond Hettinger2004-03-081-0/+5
| | | | | | | The writelines() method now accepts any iterable argument and writes the lines one at a time rather than using ''.join(lines) followed by a single write. Results in considerable memory savings and makes the method suitable for use with generator expressions.
* SF patch #907403: Improvements to cStringIO.writelines()Raymond Hettinger2004-03-082-30/+27
| | | | | | | The writelines() method now accepts any iterable argument and writes the lines one at a time rather than using ''.join(lines) followed by a single write. Results in considerable memory savings and makes the method suitable for use with generator expressions.
* Add a highlight theme for builtin keywords. Python Patch 805830 Nigel RoweKurt B. Kaiser2004-03-089-16/+42
| | | | | | | | | | | | M ClassBrowser.py M ColorDelegator.py M EditorWindow.py M NEWS.txt M PyShell.py M TreeWidget.py M config-highlight.def M configDialog.py M configHandler.py
* Removed spurious import statementVinay Sajip2004-03-081-2/+0
|
* Optimize tuple_slice() and make further improvements to list_slice()Raymond Hettinger2004-03-083-18/+28
| | | | | | and list.extend(). Factoring the inner loops to remove the constant structure references and fixed offsets gives speedups ranging from 20% to 30%.
* Refactor the copy dispatcher code in copy.py. Simplifies and shortensRaymond Hettinger2004-03-081-35/+17
| | | | the code by grouping common cases together.
* Small optimizations for list_slice() and list_extend_internal().Raymond Hettinger2004-03-081-9/+20
| | | | | | | | * Using addition instead of substraction on array indices allows the compiler to use a fast addressing mode. Saves about 10%. * Using PyTuple_GET_ITEM and PyList_SET_ITEM is about 7% faster than PySequenceFast_GET_ITEM which has to make a list check on every pass.
* Factor out code common to PyDict_Copy() and PyDict_Merge().Raymond Hettinger2004-03-081-20/+6
|