[Bug #741171] pdb crashes when enabling a non-existing breakpoint
Check the supplied breakpoint number more carefully.
(Incompatibility: before this patch, "enable -1" would enable
the last breakpoint on the list; now -1 is not a legal ID. Not sure
anyone would ever use negative indices...)
2.2 bugfix candidate, assuming making -1 illegal isn't considered a problem.
Walter Dörwald [Thu, 22 May 2003 13:15:31 +0000 (13:15 +0000)]
test_byteswap() fails on alphas, because treating the byte swapped bit
patterns as floats/doubles results in floating point exceptions.
Fix this by implementing a separate test_byteswap() for the floating
point tests. This new test compares the tostring() values of both arrays
instead of the arrays themselves.
Tim Peters [Wed, 21 May 2003 21:29:48 +0000 (21:29 +0000)]
PyType_Ready(): Complain if the type is a base type, and gc'able, and
tp_free is NULL or PyObject_Del at the end. Because it's a base type
it must call tp_free in its dealloc function, and because it's gc'able
it must not call PyObject_Del.
inherit_slots(): Don't inherit tp_free unless the type and its base
agree about whether they're gc'able. If the type is gc'able and the
base is not, and the base uses the default PyObject_Del for its
tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate
default for a gc'able type).
cPickle.c: The Pickler and Unpickler types claim to be base classes
and gc'able, but their dealloc functions didn't call tp_free.
Repaired that. Also call PyType_Ready() on these typeobjects, so
that the correct (PyObject_GC_Del) default memory-freeing function
gets plugged into these types' tp_free slots.
Jeremy Hylton [Wed, 21 May 2003 17:34:50 +0000 (17:34 +0000)]
Fix for SF [ 734869 ] Lambda functions in list comprehensions
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry.
Kurt B. Kaiser [Mon, 19 May 2003 23:11:51 +0000 (23:11 +0000)]
Fix race exposed by 2.4 GHz XP box: Don't tear down PyShell until
subprocess polling has terminated. Tk callit gets unhappy if it can't
find the function 'after' scheduled to run.
Walter Dörwald [Sun, 18 May 2003 03:15:10 +0000 (03:15 +0000)]
Fix array.array.insert(), so that it treats negative indices as
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
Tim Peters [Sat, 17 May 2003 15:57:00 +0000 (15:57 +0000)]
datetime.timedelta is now subclassable in Python. The new test shows
one good use: a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add). The
native breakdown into days+seconds+us is often clumsy. Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
Kurt B. Kaiser [Sat, 17 May 2003 03:15:48 +0000 (03:15 +0000)]
Noam Raphael's patch.
SF Patch 686254 "Run IDLEfork from any directory without set-up"
Allows IDLE to run when not installed and cwd is not the IDLE directory.
I took the liberty of moving it to the startup scripts since once IDLEfork
is again a part of Python it will be superfluous and I don't want it to
be forgotten. But it is very useful for those using IDLEfork standalone!
M CREDITS.txt
M NEWS.txt
M idle
M idle.py
M idle.pyw
Tim Peters [Sat, 17 May 2003 02:25:20 +0000 (02:25 +0000)]
test_subclass_date(): Beefed this up, to check that new instance
attributes and methods work, that new arguments can be passed to the
constructor, and that inherited methods and attrs still work. Added
XXX comments about what to do when datetime becomes usably subclassable
too (it's not yet).
Jim Fulton [Fri, 16 May 2003 13:34:33 +0000 (13:34 +0000)]
Removed the out of date and no-longer-referenced xxobject.c example
type implementation. Note that this same example lives in
Modules/xxmodule.c. (It is just as out of date there.)
* Added file globbing to make it easier to check many LaTeX files.
* Delimiter mismatch now prints a warning instead of raising an exception.
* Offer style warnings for use of e.g. and i.e.
* Bypass false positive warnings for forward slashes in urls and in /rfc822.
* Put non-LaTex delimiter matching first to make -d option more reliable.
Guido van Rossum [Fri, 16 May 2003 01:24:30 +0000 (01:24 +0000)]
Don't replace an empty line with "pass" when symbol == "eval", where
"pass" isn't valid syntax. Reported by Samuele Pedroni on python-dev
(May 12, 2003).
Kurt B. Kaiser [Thu, 15 May 2003 23:23:21 +0000 (23:23 +0000)]
1. When a module is run from an EditorWindow, if its directory is not in
sys.path, prepend it. This allows the module to import other modules
in the same directory. Do the same for a script run from the command
line.
2. Tweak the IDLE usage message a bit more.
SF Bug 706860 (closed)
SF Patch 686254 (reject specific solution)
SF Patch 507327 (similar)
Kurt B. Kaiser [Thu, 15 May 2003 18:52:51 +0000 (18:52 +0000)]
1. Add a command line switch to run without the subprocess
2. Remove the shell menu and associated bindings when running
without the subprocess.
3. Update the IDLE Help and usage text.
4. Update display_port_binding_error to suggest using -n
Kurt B. Kaiser [Thu, 15 May 2003 03:40:51 +0000 (03:40 +0000)]
1. Make the startup more robust by not spawning the subprocess if IDLE
can't acquire the port to listen on.
2. Shorten the retry and simplify the messages.
Kurt B. Kaiser [Thu, 15 May 2003 03:19:42 +0000 (03:19 +0000)]
1. Restore the capability to run and debug without a subprocess.
2. Add an indicator to the shell startup notice when running w/o
subprocess.
3. Improve exception reporting when running a command or script from the
command line.
4. Clarify the fact that breakpoints set or cleared after a file is
saved will revert to the saved state if the file is closed without
re-saving.
5. If user tries to exit or restart when user code is running, interrupt
the user code. This helps to eliminate occasional hanging
subprocesses on Windows (except for Freddy :).
Kurt B. Kaiser [Wed, 14 May 2003 18:15:40 +0000 (18:15 +0000)]
On Windows the subprocess was not exiting during a restart.
This bug, henceforth designated Freddy, was due to the mistaken
elimination of the KeyboardInterrupt exception at the previous revision.
PyShell's unix_terminate hammer was masking the problem on Linux. On W2K
the subprocess MainThread was trying to print the exception after the
SockThread had ceased to service the socket. The subprocess would then
detach and spin when the GUI created the new subprocess.
Fred Drake [Wed, 14 May 2003 04:16:14 +0000 (04:16 +0000)]
When an external application we use exits normally, exit with the same
exit code they returned. All other types of exit from child processes
are normalized to a return code of 1.
Closes SF bug #732143.