Commit Graph

23384 Commits

Author SHA1 Message Date
Martin v. Löwis a729daf2e4 Add encoding declaration. 2002-08-04 17:28:33 +00:00
Martin v. Löwis 09776b7afd Add encoding declaration. 2002-08-04 17:22:59 +00:00
Steve Holden c8389c91c2 Remove a syntax error in the example, spotted by Walter Hofman. 2002-08-04 15:27:25 +00:00
Martin v. Löwis d6359c55cc Always link libpython.so with LIBS. Fixes #589422. 2002-08-04 12:38:50 +00:00
Martin v. Löwis 7d6e19d70c Add trace_frame. Fixes #534864. Backported to 2.2. 2002-08-04 08:24:49 +00:00
Martin v. Löwis 5a39530274 Add recursion counter for pickling. Fixes #576084.
2.2 bugfix candidate (may cause RuntimeError for applications that
currently work fine).
2002-08-04 08:20:23 +00:00
Andrew MacIntyre 161ad0e16b OS/2 EMX now supported 2002-08-04 07:25:58 +00:00
Tim Peters 8d30b1e673 I don't know what's going on with this test, but the last change from
Piers obviously couldn't have passed on any platform.  Fiddling it so it
works (for a meaning of "works" no stronger than "doesn't fail" <wink>).
2002-08-04 06:53:18 +00:00
Andrew MacIntyre 80d4e2acf5 SF patch #578297:
Change the parser and compiler to use PyMalloc.

Only the files implementing processes that will request memory
allocations small enough for PyMalloc to be a win have been
changed, which are:-
 - Python/compile.c
 - Parser/acceler.c
 - Parser/node.c
 - Parser/parsetok.c

This augments the aggressive overallocation strategy implemented by
Tim Peters in PyNode_AddChild() [Parser/node.c], in reducing the
impact of platform malloc()/realloc()/free() corner case behaviour.
Such corner cases are known to be triggered by test_longexp and
test_import.

Jeremy Hylton, in accepting this patch, recommended this as a
bugfix candidate for 2.2.  While the changes to Python/compile.c
and Parser/node.c backport easily (and could go in), the changes
to Parser/acceler.c and Parser/parsetok.c require other not
insignificant changes as a result of the differences in the memory
APIs between 2.3 and 2.2, which I'm not in a position to work
through at the moment.  This is a pity, as the Parser/parsetok.c
changes are the most important after the Parser/node.c changes, due
to the size of the memory requests involved and their frequency.
2002-08-04 06:28:21 +00:00
Andrew MacIntyre 4104db39b8 - comment improvement
- implement viable library search routine for EMX
2002-08-04 06:21:25 +00:00
Andrew MacIntyre 428a38c002 add parameter missing following Jeremy's compiler class refactoring 2002-08-04 06:17:08 +00:00
Andrew M. Kuchling c61ec523ed Add two reminders 2002-08-04 01:20:05 +00:00
Martin v. Löwis 65069670b5 Document that --enable-shared puts PIC objects into the static libpython.
Fixes #589429.
2002-08-03 21:38:27 +00:00
Jack Jansen d64845dbbe Mkdirs() failed when provided with unix pathnames. Fixed. 2002-08-03 20:49:10 +00:00
Tim Peters 6681de2455 _siftup(): __le__ is now the only comparison operator used on array
elements.
2002-08-03 19:20:16 +00:00
Tim Peters 0ad679ff0f Document new heapreplace() function. 2002-08-03 18:53:28 +00:00
Tim Peters 6e0da82a97 Document new heapify() function. 2002-08-03 18:02:09 +00:00
Michael W. Hudson c4c718057e Revert last checkin. Man, that was stupid. 2002-08-03 16:39:22 +00:00
Michael W. Hudson 210f5585d2 Another fix for:
[ 589427 ] standard include paths on command line

_ssl still got /usr/include on the command line.
2002-08-03 16:16:22 +00:00
Piers Lauder dc96ae6c79 revert to version 1.2 2002-08-03 11:14:43 +00:00
Tim Peters 0cd53a6c37 Added new heapreplace(heap, item) function, to pop (and return) the
currently-smallest value, and add item, in one gulp.  See the second
N-Best algorithm in the test suite for a natural use.
2002-08-03 10:10:10 +00:00
Tim Peters 657fe38241 Large code rearrangement to use better algorithms, in the sense of needing
substantially fewer array-element compares.  This is best practice as of
Kntuh Volume 3 Ed 2, and the code is actually simpler this way (although
the key idea may be counter-intuitive at first glance!  breaking out of
a loop early loses when it costs more to try to get out early than getting
out early saves).
Also added a comment block explaining the difference and giving some real
counts; demonstrating that heapify() is more efficient than repeated
heappush(); and emphasizing the obvious point thatlist.sort() is more
efficient if what you really want to do is sort.
2002-08-03 09:56:52 +00:00
Tim Peters 6bdbc9e0b1 SF bug 590366: Small typo in listsort:ParseTuple
The PyArg_ParseTuple() error string still said "msort".  Changed to "sort".
2002-08-03 02:28:24 +00:00
Tim Peters 30e0beab6d Remove cut 'n paste silliness. 2002-08-03 02:17:41 +00:00
Tim Peters aa7d24319e Minor fiddling, including a simple class to implement a heap iterator
in the test file.  I have docs for heapq.heapify ready to check in, but
Jack appears to have left behind a stale lock in the Doc/lib directory.
2002-08-03 02:11:26 +00:00
Jack Jansen 0e0a479821 Added an icon for .pyw files. 2002-08-02 22:32:41 +00:00
Jack Jansen 2f8816fda6 An icon for .pyw files. Yes, it's lousy, I know.... 2002-08-02 22:18:05 +00:00
Guido van Rossum fbb299226d Augment credits. 2002-08-02 22:01:37 +00:00
Tim Peters 28c25527c2 Hmm! I thought I checked this in before! Oh well.
Added new heapify() function, which transforms an arbitrary list into a
heap in linear time; that's a fundamental tool for using heaps in real
life <wink>.

Added heapyify() test.  Added a "less naive" N-best algorithm to the test
suite, and noted that this could actually go much faster (building on
heapify()) if we had max-heaps instead of min-heaps (the iterative method
is appropriate when all the data isn't known in advance, but when it is
known in advance the tradeoffs get murkier).
2002-08-02 21:48:06 +00:00
Jack Jansen 940dc922c0 Build the IDE last, as it may fail because of waste missing. 2002-08-02 21:46:40 +00:00
Jack Jansen 0fdaee7419 Added a lot more information on framework builds, the various .app's,
etc. Still not enough, probably, but better than what we had.
2002-08-02 21:45:27 +00:00
Jack Jansen 337f85d34f Updated for the new path to Python.app. 2002-08-02 21:05:16 +00:00
Jack Jansen f80798b1ca When building the IDE check that waste is available, to forestall
surprises later (the IDE won't work without waste).
2002-08-02 21:04:46 +00:00
Guido van Rossum 4b48d6b37c Add a PEP-263-style encoding turd^H^H^H^Hdeclaration, because there's
a c-cedilla in one of the docstrings.
2002-08-02 20:23:56 +00:00
Fred Drake 610291cf5a Fix ref(), proxy() docstrings, based on comments from David Abrahams. 2002-08-02 20:23:40 +00:00
Tim Peters 62abc2f6ce heappop(): Added comments; simplified and sped the code. 2002-08-02 20:09:14 +00:00
Fred Drake 1acab695a7 Minor markup changes. 2002-08-02 19:46:42 +00:00
Tim Peters a0b3a00bc5 heappop(): Use "while True" instead of "while 1". 2002-08-02 19:45:37 +00:00
Tim Peters d2cf1ab0e2 check_invariant(): Use the same child->parent "formula" used by heapq.py. 2002-08-02 19:41:54 +00:00
Tim Peters d9ea39db84 Don't use true division where int division was intended. For that matter,
don't use division at all.
2002-08-02 19:16:44 +00:00
Fred Drake b481286504 Add a comment showing how one of the macros should be used. 2002-08-02 18:30:22 +00:00
Guido van Rossum 0b19178736 Adding the heap queue algorithm, per discussion in python-dev last
week.
2002-08-02 18:29:53 +00:00
Fred Drake ad09bbfce3 Add heapq module docs to the dependency information. 2002-08-02 18:20:34 +00:00
Guido van Rossum 4a57c33dff Adding the heap queue algorithm, per discussion in python-dev last
week.
2002-08-02 18:05:20 +00:00
Guido van Rossum 975121664e Add docs for heapq.py. 2002-08-02 18:03:24 +00:00
Skip Montanaro de994d9130 indicate that 'b' is added to the mode flag if not given 2002-08-02 17:20:46 +00:00
Skip Montanaro 71ffc5cc4b add #include branch for compilation with Berkeley DB 2002-08-02 17:13:01 +00:00
Skip Montanaro 404378f834 catch the situation where Berkeley DB is used to emulate dbm(3) library
functions.  In this case, calling dbm.open("foo", "c") actually creates a
file named "foo.db".
2002-08-02 17:12:15 +00:00
Skip Montanaro 13a5678a51 regression test for the whichdb module 2002-08-02 17:10:10 +00:00
Guido van Rossum 37c3b2788b Add Kevin O'Connor, author of the heapq code. 2002-08-02 16:50:58 +00:00