]> granicus.if.org Git - python/log
python
22 years agoSF 582071 clarified the .split() method's docstring to note that sep=None
Raymond Hettinger [Mon, 5 Aug 2002 06:28:21 +0000 (06:28 +0000)]
SF 582071 clarified the .split() method's docstring to note that sep=None
will trigger splitting on any whitespace.

22 years agoNote that True and False are pickable objects
Raymond Hettinger [Mon, 5 Aug 2002 03:55:36 +0000 (03:55 +0000)]
Note that True and False are pickable objects

22 years agoGvR provided solution to the socket rebinding timeout problem.
Kurt B. Kaiser [Mon, 5 Aug 2002 03:52:10 +0000 (03:52 +0000)]
GvR provided solution to the socket rebinding timeout problem.

M PyShell.py
M rpc.py
M run.py

22 years agoAdd 1 to lineno in deprecation warning. Fixes #590888.
Martin v. Löwis [Mon, 5 Aug 2002 01:49:16 +0000 (01:49 +0000)]
Add 1 to lineno in deprecation warning. Fixes #590888.

22 years agoTest whether a Cyrillic text correctly appears in a Unicode literal.
Martin v. Löwis [Mon, 5 Aug 2002 01:32:09 +0000 (01:32 +0000)]
Test whether a Cyrillic text correctly appears in a Unicode literal.

22 years agoWe don't really need the name of the test in the "test skipped" msg, and
Tim Peters [Sun, 4 Aug 2002 22:55:35 +0000 (22:55 +0000)]
We don't really need the name of the test in the "test skipped" msg, and
having it there causes the line to wrap.

22 years agoOops! Forgot the closing paren.
Tim Peters [Sun, 4 Aug 2002 22:52:30 +0000 (22:52 +0000)]
Oops!  Forgot the closing paren.

22 years agoFinally got around to figuring out and documenting why this test fails
Tim Peters [Sun, 4 Aug 2002 22:35:31 +0000 (22:35 +0000)]
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>.

22 years agoBuild the _IBCarbon module.
Jack Jansen [Sun, 4 Aug 2002 22:04:25 +0000 (22:04 +0000)]
Build the _IBCarbon module.

22 years agoThe definitions for IBCarbonRuntime.h
Jack Jansen [Sun, 4 Aug 2002 22:03:36 +0000 (22:03 +0000)]
The definitions for IBCarbonRuntime.h

22 years agoUpdated to something that works on my system, and regenerated module.
Jack Jansen [Sun, 4 Aug 2002 21:59:37 +0000 (21:59 +0000)]
Updated to something that works on my system, and regenerated module.

22 years agoSpecify pathnames in a way that works on both OS9 and OSX.
Jack Jansen [Sun, 4 Aug 2002 21:56:12 +0000 (21:56 +0000)]
Specify pathnames in a way that works on both OS9 and OSX.
You'll still have to manually edit it, though...

22 years agoUse universal newline input when scanning header files.
Jack Jansen [Sun, 4 Aug 2002 21:55:25 +0000 (21:55 +0000)]
Use universal newline input when scanning header files.

22 years agoDonovan Preston's interface to IBCarbon, allowing you to use Interface
Jack Jansen [Sun, 4 Aug 2002 21:34:24 +0000 (21:34 +0000)]
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!

22 years agoChanges to the OSX section:
Jack Jansen [Sun, 4 Aug 2002 21:19:55 +0000 (21:19 +0000)]
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.

22 years agoUse the -n option of ln in stead of -h, as it also works with other ln's
Jack Jansen [Sun, 4 Aug 2002 21:17:20 +0000 (21:17 +0000)]
Use the -n option of ln in stead of -h, as it also works with other ln's
people may have (fink, gnu).

22 years agosmall speedup for constant and name access
Skip Montanaro [Sun, 4 Aug 2002 21:03:35 +0000 (21:03 +0000)]
small speedup for constant and name access
see sf #506436

22 years agoMake pgen compile with pydebug. Duplicate normalized names, as it may
Martin v. Löwis [Sun, 4 Aug 2002 20:10:29 +0000 (20:10 +0000)]
Make pgen compile with pydebug. Duplicate normalized names, as it may
be longer than the old string.

22 years agoGroup statements properly.
Martin v. Löwis [Sun, 4 Aug 2002 18:28:44 +0000 (18:28 +0000)]
Group statements properly.

22 years agoRepaired a fatal compiler error in the debug build: it's not clear what
Tim Peters [Sun, 4 Aug 2002 17:58:34 +0000 (17:58 +0000)]
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.

22 years agoSquash compiler wng about signed-vs-unsigned mismatch.
Tim Peters [Sun, 4 Aug 2002 17:56:42 +0000 (17:56 +0000)]
Squash compiler wng about signed-vs-unsigned mismatch.

22 years agoSped the usual case for sorting by calling PyObject_RichCompareBool
Tim Peters [Sun, 4 Aug 2002 17:47:26 +0000 (17:47 +0000)]
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

22 years agoPatch #534304: Implement phase 1 of PEP 263.
Martin v. Löwis [Sun, 4 Aug 2002 17:29:52 +0000 (17:29 +0000)]
Patch #534304: Implement phase 1 of PEP 263.

22 years agoAdd encoding declaration.
Martin v. Löwis [Sun, 4 Aug 2002 17:28:33 +0000 (17:28 +0000)]
Add encoding declaration.

22 years agoAdd encoding declaration.
Martin v. Löwis [Sun, 4 Aug 2002 17:22:59 +0000 (17:22 +0000)]
Add encoding declaration.

22 years agoRemove a syntax error in the example, spotted by Walter Hofman.
Steve Holden [Sun, 4 Aug 2002 15:27:25 +0000 (15:27 +0000)]
Remove a syntax error in the example, spotted by Walter Hofman.

22 years agoAlways link libpython.so with LIBS. Fixes #589422.
Martin v. Löwis [Sun, 4 Aug 2002 12:38:50 +0000 (12:38 +0000)]
Always link libpython.so with LIBS. Fixes #589422.

22 years agoAdd trace_frame. Fixes #534864. Backported to 2.2.
Martin v. Löwis [Sun, 4 Aug 2002 08:24:49 +0000 (08:24 +0000)]
Add trace_frame. Fixes #534864. Backported to 2.2.

22 years agoAdd recursion counter for pickling. Fixes #576084.
Martin v. Löwis [Sun, 4 Aug 2002 08:20:23 +0000 (08:20 +0000)]
Add recursion counter for pickling. Fixes #576084.
2.2 bugfix candidate (may cause RuntimeError for applications that
currently work fine).

22 years agoOS/2 EMX now supported
Andrew MacIntyre [Sun, 4 Aug 2002 07:25:58 +0000 (07:25 +0000)]
OS/2 EMX now supported

22 years agoI don't know what's going on with this test, but the last change from
Tim Peters [Sun, 4 Aug 2002 06:53:18 +0000 (06:53 +0000)]
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>).

22 years agoSF patch #578297:
Andrew MacIntyre [Sun, 4 Aug 2002 06:28:21 +0000 (06:28 +0000)]
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.

22 years ago- comment improvement
Andrew MacIntyre [Sun, 4 Aug 2002 06:21:25 +0000 (06:21 +0000)]
- comment improvement
- implement viable library search routine for EMX

22 years agoadd parameter missing following Jeremy's compiler class refactoring
Andrew MacIntyre [Sun, 4 Aug 2002 06:17:08 +0000 (06:17 +0000)]
add parameter missing following Jeremy's compiler class refactoring

22 years agoAdd two reminders
Andrew M. Kuchling [Sun, 4 Aug 2002 01:20:05 +0000 (01:20 +0000)]
Add two reminders

22 years agoDocument that --enable-shared puts PIC objects into the static libpython.
Martin v. Löwis [Sat, 3 Aug 2002 21:38:27 +0000 (21:38 +0000)]
Document that --enable-shared puts PIC objects into the static libpython.
Fixes #589429.

22 years agoMkdirs() failed when provided with unix pathnames. Fixed.
Jack Jansen [Sat, 3 Aug 2002 20:49:10 +0000 (20:49 +0000)]
Mkdirs() failed when provided with unix pathnames. Fixed.

22 years ago_siftup(): __le__ is now the only comparison operator used on array
Tim Peters [Sat, 3 Aug 2002 19:20:16 +0000 (19:20 +0000)]
_siftup():  __le__ is now the only comparison operator used on array
elements.

22 years agoDocument new heapreplace() function.
Tim Peters [Sat, 3 Aug 2002 18:53:28 +0000 (18:53 +0000)]
Document new heapreplace() function.

22 years agoDocument new heapify() function.
Tim Peters [Sat, 3 Aug 2002 18:02:09 +0000 (18:02 +0000)]
Document new heapify() function.

22 years agoRevert last checkin. Man, that was stupid.
Michael W. Hudson [Sat, 3 Aug 2002 16:39:22 +0000 (16:39 +0000)]
Revert last checkin.  Man, that was stupid.

22 years agoAnother fix for:
Michael W. Hudson [Sat, 3 Aug 2002 16:16:22 +0000 (16:16 +0000)]
Another fix for:

[ 589427 ] standard include paths on command line

_ssl still got /usr/include on the command line.

22 years agorevert to version 1.2
Piers Lauder [Sat, 3 Aug 2002 11:14:43 +0000 (11:14 +0000)]
revert to version 1.2

22 years agoAdded new heapreplace(heap, item) function, to pop (and return) the
Tim Peters [Sat, 3 Aug 2002 10:10:10 +0000 (10:10 +0000)]
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.

22 years agoLarge code rearrangement to use better algorithms, in the sense of needing
Tim Peters [Sat, 3 Aug 2002 09:56:52 +0000 (09:56 +0000)]
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.

22 years agoSF bug 590366: Small typo in listsort:ParseTuple
Tim Peters [Sat, 3 Aug 2002 02:28:24 +0000 (02:28 +0000)]
SF bug 590366:  Small typo in listsort:ParseTuple
The PyArg_ParseTuple() error string still said "msort".  Changed to "sort".

22 years agoRemove cut 'n paste silliness.
Tim Peters [Sat, 3 Aug 2002 02:17:41 +0000 (02:17 +0000)]
Remove cut 'n paste silliness.

22 years agoMinor fiddling, including a simple class to implement a heap iterator
Tim Peters [Sat, 3 Aug 2002 02:11:26 +0000 (02:11 +0000)]
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.

22 years agoAdded an icon for .pyw files.
Jack Jansen [Fri, 2 Aug 2002 22:32:41 +0000 (22:32 +0000)]
Added an icon for .pyw files.

22 years agoAn icon for .pyw files. Yes, it's lousy, I know....
Jack Jansen [Fri, 2 Aug 2002 22:18:05 +0000 (22:18 +0000)]
An icon for .pyw files. Yes, it's lousy, I know....

22 years agoAugment credits.
Guido van Rossum [Fri, 2 Aug 2002 22:01:37 +0000 (22:01 +0000)]
Augment credits.

22 years agoHmm! I thought I checked this in before! Oh well.
Tim Peters [Fri, 2 Aug 2002 21:48:06 +0000 (21:48 +0000)]
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).

22 years agoBuild the IDE last, as it may fail because of waste missing.
Jack Jansen [Fri, 2 Aug 2002 21:46:40 +0000 (21:46 +0000)]
Build the IDE last, as it may fail because of waste missing.

22 years agoAdded a lot more information on framework builds, the various .app's,
Jack Jansen [Fri, 2 Aug 2002 21:45:27 +0000 (21:45 +0000)]
Added a lot more information on framework builds, the various .app's,
etc. Still not enough, probably, but better than what we had.

22 years agoUpdated for the new path to Python.app.
Jack Jansen [Fri, 2 Aug 2002 21:05:16 +0000 (21:05 +0000)]
Updated for the new path to Python.app.

22 years agoWhen building the IDE check that waste is available, to forestall
Jack Jansen [Fri, 2 Aug 2002 21:04:46 +0000 (21:04 +0000)]
When building the IDE check that waste is available, to forestall
surprises later (the IDE won't work without waste).

22 years agoAdd a PEP-263-style encoding turd^H^H^H^Hdeclaration, because there's
Guido van Rossum [Fri, 2 Aug 2002 20:23:56 +0000 (20:23 +0000)]
Add a PEP-263-style encoding turd^H^H^H^Hdeclaration, because there's
a c-cedilla in one of the docstrings.

22 years agoFix ref(), proxy() docstrings, based on comments from David Abrahams.
Fred Drake [Fri, 2 Aug 2002 20:23:40 +0000 (20:23 +0000)]
Fix ref(), proxy() docstrings, based on comments from David Abrahams.

22 years agoheappop(): Added comments; simplified and sped the code.
Tim Peters [Fri, 2 Aug 2002 20:09:14 +0000 (20:09 +0000)]
heappop():  Added comments; simplified and sped the code.

22 years agoMinor markup changes.
Fred Drake [Fri, 2 Aug 2002 19:46:42 +0000 (19:46 +0000)]
Minor markup changes.

22 years agoheappop(): Use "while True" instead of "while 1".
Tim Peters [Fri, 2 Aug 2002 19:45:37 +0000 (19:45 +0000)]
heappop():  Use "while True" instead of "while 1".

22 years agocheck_invariant(): Use the same child->parent "formula" used by heapq.py.
Tim Peters [Fri, 2 Aug 2002 19:41:54 +0000 (19:41 +0000)]
check_invariant():  Use the same child->parent "formula" used by heapq.py.

22 years agoDon't use true division where int division was intended. For that matter,
Tim Peters [Fri, 2 Aug 2002 19:16:44 +0000 (19:16 +0000)]
Don't use true division where int division was intended.  For that matter,
don't use division at all.

22 years agoAdd a comment showing how one of the macros should be used.
Fred Drake [Fri, 2 Aug 2002 18:30:22 +0000 (18:30 +0000)]
Add a comment showing how one of the macros should be used.

22 years agoAdding the heap queue algorithm, per discussion in python-dev last
Guido van Rossum [Fri, 2 Aug 2002 18:29:53 +0000 (18:29 +0000)]
Adding the heap queue algorithm, per discussion in python-dev last
week.

22 years agoAdd heapq module docs to the dependency information.
Fred Drake [Fri, 2 Aug 2002 18:20:34 +0000 (18:20 +0000)]
Add heapq module docs to the dependency information.

22 years agoAdding the heap queue algorithm, per discussion in python-dev last
Guido van Rossum [Fri, 2 Aug 2002 18:05:20 +0000 (18:05 +0000)]
Adding the heap queue algorithm, per discussion in python-dev last
week.

22 years agoAdd docs for heapq.py.
Guido van Rossum [Fri, 2 Aug 2002 18:03:24 +0000 (18:03 +0000)]
Add docs for heapq.py.

22 years agoindicate that 'b' is added to the mode flag if not given
Skip Montanaro [Fri, 2 Aug 2002 17:20:46 +0000 (17:20 +0000)]
indicate that 'b' is added to the mode flag if not given

22 years agoadd #include branch for compilation with Berkeley DB
Skip Montanaro [Fri, 2 Aug 2002 17:13:01 +0000 (17:13 +0000)]
add #include branch for compilation with Berkeley DB

22 years agocatch the situation where Berkeley DB is used to emulate dbm(3) library
Skip Montanaro [Fri, 2 Aug 2002 17:12:15 +0000 (17:12 +0000)]
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".

22 years agoregression test for the whichdb module
Skip Montanaro [Fri, 2 Aug 2002 17:10:10 +0000 (17:10 +0000)]
regression test for the whichdb module

22 years agoAdd Kevin O'Connor, author of the heapq code.
Guido van Rossum [Fri, 2 Aug 2002 16:50:58 +0000 (16:50 +0000)]
Add Kevin O'Connor, author of the heapq code.

22 years agoAdding the heap queue algorithm, per discussion in python-dev last
Guido van Rossum [Fri, 2 Aug 2002 16:44:32 +0000 (16:44 +0000)]
Adding the heap queue algorithm, per discussion in python-dev last
week.

22 years agotestGetServByName shouldn't check for getservbyname - the socket module
Skip Montanaro [Fri, 2 Aug 2002 15:52:30 +0000 (15:52 +0000)]
testGetServByName shouldn't check for getservbyname - the socket module
should always have it.

22 years agoAlso create BuildApplet. It's useful enough as a standalone application.
Jack Jansen [Fri, 2 Aug 2002 15:32:12 +0000 (15:32 +0000)]
Also create BuildApplet. It's useful enough as a standalone application.

22 years agoHmm, in some cases we don't seem to get our scriptname in argv[0].
Jack Jansen [Fri, 2 Aug 2002 15:31:25 +0000 (15:31 +0000)]
Hmm, in some cases we don't seem to get our scriptname in argv[0].
Cater for that by working from sys.executable.

22 years agoFinal step in making applets first-class citizens: if the applet wants
Jack Jansen [Fri, 2 Aug 2002 14:57:43 +0000 (14:57 +0000)]
Final step in making applets first-class citizens: if the applet wants
argv emulation (i.e. if the end user drops files and folders on the
applets these will show up in sys.argv) BuildApplet will add the required
code to the applet bundle, in __rawmain__.pyc.

This code is compiled from appletrawmain.py, it creates sys.argv, cleans
up most of the mess and executes either __main__.py or __main__.pyc.

22 years agoOops, the -psn stuff is in argv[1], of course.
Jack Jansen [Fri, 2 Aug 2002 14:54:46 +0000 (14:54 +0000)]
Oops, the -psn stuff is in argv[1], of course.

22 years agoAdded one call to Py_Main(), for OSX framework builds only, that will get the
Jack Jansen [Fri, 2 Aug 2002 14:11:24 +0000 (14:11 +0000)]
Added one call to Py_Main(), for OSX framework builds only, that will get the
actual script to run in case we are running from an applet. If we are indeed
running an applet we skip the normal option processing leaving it all to the
applet code.

This allows us to get use the normal python binary in the Python.app bundle,
giving us all the normal command line options through PythonLauncher while
still allowing Python.app to be used as the template for building applets.

Consequently, pythonforbundle is gone, and Mac/Python/macmain.c isn't used
on OSX anymore.

22 years agoGot rid of a couple of OS9-isms.
Jack Jansen [Fri, 2 Aug 2002 14:04:42 +0000 (14:04 +0000)]
Got rid of a couple of OS9-isms.

22 years ago- Slightly better error message in case of syntax errors in the script.
Jack Jansen [Fri, 2 Aug 2002 14:04:15 +0000 (14:04 +0000)]
- Slightly better error message in case of syntax errors in the script.
- The applet .rsrc file should be called python.rsrc, it is not based on the
  applet name.

22 years agoFix for
Michael W. Hudson [Fri, 2 Aug 2002 13:55:50 +0000 (13:55 +0000)]
Fix for

[ 589427 ] standard include paths on command line

22 years ago- Remove -psn-xxxx argument added by the Finder.
Jack Jansen [Fri, 2 Aug 2002 12:56:21 +0000 (12:56 +0000)]
- Remove -psn-xxxx argument added by the Finder.
- "Open Document" appleevent is "odoc", not "open".

22 years agoReplaced python.app target with osxapps (it builds more than
Jack Jansen [Fri, 2 Aug 2002 11:24:11 +0000 (11:24 +0000)]
Replaced python.app target with osxapps (it builds more than
one .app nowadays) and fixed it to work.

22 years agoConstruct a sys.argv from the initial AppleEvent sent by the finder
Jack Jansen [Fri, 2 Aug 2002 11:12:15 +0000 (11:12 +0000)]
Construct a sys.argv from the initial AppleEvent sent by the finder
during startup of a program. This module will replace the C code in
macgetargv.c so we can get rid of the special macmain.c for OSX
Python.app.

22 years agoSlightly better error message in case of missing resources.
Jack Jansen [Fri, 2 Aug 2002 11:03:19 +0000 (11:03 +0000)]
Slightly better error message in case of missing resources.

22 years agoNew test %sort. This takes a sorted list, picks 1% of the list positions
Tim Peters [Fri, 2 Aug 2002 05:46:09 +0000 (05:46 +0000)]
New test %sort.  This takes a sorted list, picks 1% of the list positions
at random, and replaces the elements at those positions with new random
values.  I was pleasantly surprised by how fast this goes!  It's hard to
conceive of an algorithm that could special-case for this effectively.
Plus it's exactly what happens if a burst of gamma rays corrupts your
sorted database on disk <wink>.

 i    2**i  *sort  ...  %sort
15   32768   0.18  ...   0.03
16   65536   0.24  ...   0.04
17  131072   0.53  ...   0.08
18  262144   1.17  ...   0.16
19  524288   2.56  ...   0.35
20 1048576   5.54  ...   0.77

22 years agoExcise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
Mark Hammond [Fri, 2 Aug 2002 02:27:13 +0000 (02:27 +0000)]
Excise DL_EXPORT/DL_IMPORT from Modules/*.  Required adding a prototype
for Py_Main().

Thanks to Kalle Svensson and Skip Montanaro for the patches.

22 years agomodify testGetServByName so it tries a few different protocols. In this day
Skip Montanaro [Fri, 2 Aug 2002 02:19:46 +0000 (02:19 +0000)]
modify testGetServByName so it tries a few different protocols.  In this day
and age of rampant computer breakins I imagine there are plenty of systems
with telnet disabled.  Successful check of at least one getservbyname() call
is required for success

22 years ago- Get _environ through the NSEnviron call in a MacOSX framework. This allows
Jack Jansen [Thu, 1 Aug 2002 21:57:49 +0000 (21:57 +0000)]
- Get _environ through the NSEnviron call in a MacOSX framework. This allows
  us to completely decouple the framework from the executable, so we
  can use a two-level namespace.
- Do framework builds with a twolevel namespace.
- Reorganized the code that creates the minimal framework in the build
  directory, to make it more robust against incomplete frameworks (from
  earlier aborted builds, or builds of previous Python versions).

22 years agoPython.app is now a hidden application, deep in the framework. It will
Jack Jansen [Thu, 1 Aug 2002 21:14:06 +0000 (21:14 +0000)]
Python.app is now a hidden application, deep in the framework. It will
be invoked by PythonLauncher when needed.

Also changed the names of various variables in the Makefile to match
what the main Makefile has.

22 years agoPython.app no longer advertises that it can handle .py and .pyc files,
Jack Jansen [Thu, 1 Aug 2002 21:12:36 +0000 (21:12 +0000)]
Python.app no longer advertises that it can handle .py and .pyc files,
PythonLauncher.app has taken that responsibility over.

22 years agoFix for SF bug 570678 (can't flush read-only file on Mac OS X).
Guido van Rossum [Thu, 1 Aug 2002 21:12:35 +0000 (21:12 +0000)]
Fix for SF bug 570678 (can't flush read-only file on Mac OS X).

22 years agoTim found that once test_longexp has run, test_sort takes very much
Guido van Rossum [Thu, 1 Aug 2002 18:50:33 +0000 (18:50 +0000)]
Tim found that once test_longexp has run, test_sort takes very much
longer to run than normal.  A profiler run showed that this was due to
PyFrame_New() taking up an unreasonable amount of time.  A little
thinking showed that this was due to the while loop clearing the space
available for the stack.  The solution is to only clear the local
variables (and cells and free variables), not the space available for
the stack, since anything beyond the stack top is considered to be
garbage anyway.  Also, use memset() instead of a while loop counting
backwards.  This should be a time savings for normal code too!  (By a
probably unmeasurable amount. :-)

22 years agoOnly show the UI for selecting options if the ALT key was depressed while
Jack Jansen [Thu, 1 Aug 2002 15:07:00 +0000 (15:07 +0000)]
Only show the UI for selecting options if the ALT key was depressed while
dragging or double-clicking the script.

22 years agoSF patch 588728 (Nathan Srebro).
Guido van Rossum [Thu, 1 Aug 2002 14:39:25 +0000 (14:39 +0000)]
SF patch 588728 (Nathan Srebro).

The __delete__ method wrapper for descriptors was not supported

(I added a test, too.)

2.2 bugfix candidate.

22 years agoAdded new footnote about list.sort() stability. Repaired footnote about
Tim Peters [Thu, 1 Aug 2002 03:10:45 +0000 (03:10 +0000)]
Added new footnote about list.sort() stability.  Repaired footnote about
using sort() with comparison functions (it made reference to the non-
existent "builtin-in function sort()").

BTW, I changed list.sort's docstring to contain the word "stable" -- the
easiest way to tell whether a particular Python version's sort *is* stable
is to look for "stable" in the docstring.  I'm not sure whether to
advertise this <wink>.

22 years agoA blurb about the sort implementation.
Tim Peters [Thu, 1 Aug 2002 02:34:51 +0000 (02:34 +0000)]
A blurb about the sort implementation.

22 years agoNew test for sorting sanity. Note that this will fail in earlier Pythons,
Tim Peters [Thu, 1 Aug 2002 02:23:06 +0000 (02:23 +0000)]
New test for sorting sanity.  Note that this will fail in earlier Pythons,
in the stability tests.

Bizarre:  this takes 11x longer to run if and only if test_longexp is
run before it, on my box.  The bigger REPS is in test_longexp, the
slower this gets.  What happens on your box?  It's not gc on my box
(which is good, because gc isn't a plausible candidate here).

The slowdown is massive in the parts of test_sort that implicitly
invoke a new-style class's __lt__ or __cmp__ methods.  If I boost
REPS large enough in test_longexp, even the test_sort tests on an array
of size 64 visibly c-r-a-w-l.  The relative slowdown is even worse in
a debug build.  And if I reduce REPS in test_longexp, the slowdown in
test_sort goes away.

test_longexp does do horrid things to Win98's management of user
address space, but I thought I had made that a whole lot better a month
or so ago (by overallocating aggressively in the parser).