Commit Graph

23703 Commits

Author SHA1 Message Date
Martin v. Löwis
4c561b36a0 Test whether a Cyrillic text correctly appears in a Unicode literal. 2002-08-05 01:32:09 +00:00
Tim Peters
6782d6aa91 We don't really need the name of the test in the "test skipped" msg, and
having it there causes the line to wrap.
2002-08-04 22:55:35 +00:00
Tim Peters
283ead8bf2 Oops! Forgot the closing paren. 2002-08-04 22:52:30 +00:00
Tim Peters
32ef169339 Finally got around to figuring out and documenting why this test fails
on Windows.  The test_sequence() ERROR is easily repaired if we're
willing to add an os.unlink() line to mhlib's updateline().  The
test_listfolders FAIL I gave up on -- I don't remember enough about Unix
link esoterica to recall why a link count of 2 is something a well-
written program should be keenly interested in <wink>.
2002-08-04 22:35:31 +00:00
Jack Jansen
a30d1447cf Build the _IBCarbon module. 2002-08-04 22:04:25 +00:00
Jack Jansen
83f5c38403 The definitions for IBCarbonRuntime.h 2002-08-04 22:03:36 +00:00
Jack Jansen
acbaefd796 Updated to something that works on my system, and regenerated module. 2002-08-04 21:59:37 +00:00
Jack Jansen
7ea8143fe5 Specify pathnames in a way that works on both OS9 and OSX.
You'll still have to manually edit it, though...
2002-08-04 21:56:12 +00:00
Jack Jansen
bae7734eef Use universal newline input when scanning header files. 2002-08-04 21:55:25 +00:00
Jack Jansen
0c069924e5 Donovan Preston's interface to IBCarbon, allowing you to use Interface
Builder carbon NIB files from Python. As-is, I may need to twiddle a few
things as he donated this long ago.

Donovan is now one of the four people in the world who know how to drive
bgen!
2002-08-04 21:34:24 +00:00
Jack Jansen
84a016417a Changes to the OSX section:
- steer people away from installing with sudo
- warn that fink-installed software may cause trouble
- explain why you might want a framework build and point people to
  Mac/OSX/README.
2002-08-04 21:19:55 +00:00
Jack Jansen
c736b8df09 Use the -n option of ln in stead of -h, as it also works with other ln's
people may have (fink, gnu).
2002-08-04 21:17:20 +00:00
Skip Montanaro
04d80f87d7 small speedup for constant and name access
see sf #506436
2002-08-04 21:03:35 +00:00
Martin v. Löwis
1ee99d31d9 Make pgen compile with pydebug. Duplicate normalized names, as it may
be longer than the old string.
2002-08-04 20:10:29 +00:00
Martin v. Löwis
cd280fb59c Group statements properly. 2002-08-04 18:28:44 +00:00
Tim Peters
2c3f9c6f04 Repaired a fatal compiler error in the debug build: it's not clear what
this was trying to assert, but the name it referenced didn't exist.
2002-08-04 17:58:34 +00:00
Tim Peters
919603b27a Squash compiler wng about signed-vs-unsigned mismatch. 2002-08-04 17:56:42 +00:00
Tim Peters
66860f6da4 Sped the usual case for sorting by calling PyObject_RichCompareBool
directly when no comparison function is specified.  This saves a layer
of function call on every compare then.  Measured speedups:

 i    2**i  *sort  \sort  /sort  3sort  +sort  %sort  ~sort  =sort  !sort
15   32768  12.5%   0.0%   0.0% 100.0%   0.0%  50.0% 100.0% 100.0% -50.0%
16   65536   8.7%   0.0%   0.0%   0.0%   0.0%   0.0%  12.5%   0.0%   0.0%
17  131072   8.0%  25.0%   0.0%  25.0%   0.0%  14.3%   5.9%   0.0%   0.0%
18  262144   6.3% -10.0%  12.5%  11.1%   0.0%   6.3%   5.6%  12.5%   0.0%
19  524288   5.3%   5.9%   0.0%   5.6%   0.0%   5.9%   5.4%   0.0%   2.9%
20 1048576   5.3%   2.9%   2.9%   5.1%   2.8%   1.3%   5.9%   2.9%   4.2%

The best indicators are those that take significant time (larger i), and
where sort doesn't do very few compares (so *sort and ~sort benefit most
reliably).  The large numbers are due to roundoff noise combined with
platform variability; e.g., the 14.3% speedup for %sort at i=17 reflects
a printed elapsed time of 0.18 seconds falling to 0.17, but a change in
the last digit isn't really meaningful (indeed, if it really took 0.175
seconds, one electron having a lazy nanosecond could shift it to either
value <wink>).  Similarly the 25% at 3sort i=17 was a meaningless change
from 0.05 to 0.04.  However, almost all the "meaningless changes" were
in the same direction, which is good.  The before-and-after times for
*sort are clearest:

before after
  0.18  0.16
  0.25  0.23
  0.54  0.50
  1.18  1.11
  2.57  2.44
  5.58  5.30
2002-08-04 17:47:26 +00:00
Martin v. Löwis
00f1e3f5a5 Patch #534304: Implement phase 1 of PEP 263. 2002-08-04 17:29:52 +00:00
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