Commit Graph

8224 Commits

Author SHA1 Message Date
Andrew M. Kuchling b1f8bab654 [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.
2003-05-22 14:46:12 +00:00
Neal Norwitz 35c6cd0905 Walter's last checkin also needs to work on doubles.
* Move new test_byteswap into FPTest.
 * Remove extra lines at end of file.
2003-05-22 13:29:15 +00:00
Walter Dörwald cf99b0afb6 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.

Discovered by Neal Norwitz.
2003-05-22 13:15:31 +00:00
Jeremy Hylton 4d508adae3 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.

Bugfix candidate.
2003-05-21 17:34:50 +00:00
Barry Warsaw e960e22579 Added a test for the fix of SF bug #658233, where continuation lines
in .po metadata caused a crash.

Also, removed some unnecessary code.

Backport candidate.
2003-05-20 17:28:54 +00:00
Barry Warsaw 7de63f57c8 GNUTranslations._parse(): Fix SF bug #658233, where continuation lines
in .po metadata caused a crash.

Backport candidate.
2003-05-20 17:26:48 +00:00
Just van Rossum 5d6ad75d50 'Progress' doesn't exists, causing 'from EasyDialogs import *' to fail 2003-05-20 12:07:19 +00:00
Raymond Hettinger 092b2a97d2 SF 740055: optional argument protocol in shelve.open is ignored
* added the missing parameter
* put optional parameters in correct positional order
2003-05-20 05:15:55 +00:00
Raymond Hettinger 22952a3efc SF bug 735293: Command line timeit.py sets sys.path badly
Paul Moore's patch to have timeit.py check the current directory for
imports (instead of the directory for Lib/timeit.py).
2003-05-20 04:59:56 +00:00
Kurt B. Kaiser 88957d8d0d 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.

M PyShell.py
2003-05-19 23:11:51 +00:00
Skip Montanaro 7789237331 * Correct Sniffer doc to correspond to the implementation.
* Add optional delimiters arg to Sniffer.sniff() which restricts the set of
  candidate field delimiters.
2003-05-19 15:33:36 +00:00
Kurt B. Kaiser c626658a28 Let Python inform the user what went wrong with the import.
Modified Files:
 	idle idle.py idle.pyw
2003-05-19 02:07:44 +00:00
Martin v. Löwis 9a3a9f7791 Consider \U-escapes in raw-unicode-escape. Fixes #444514. 2003-05-18 12:31:09 +00:00
Walter Dörwald 9e46abed50 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.
2003-05-18 03:15:10 +00:00
Brett Cannon df0d87a922 To be on the safe side, backed out any questionable iteritem changes and set back to item calls. 2003-05-18 02:25:07 +00:00
Kurt B. Kaiser 476740142d Whitespace Normalization 2003-05-18 02:24:32 +00:00
Kurt B. Kaiser 282f122250 Whitespace Normalization
Modified Files:
 	config-extensions.def config-highlight.def config-keys.def
 	config-main.def
2003-05-18 02:21:55 +00:00
Walter Dörwald ba39d9c168 Add another error case to the insert test. 2003-05-18 01:56:25 +00:00
Walter Dörwald 7fd9424230 Port test_array and test_winsound to PyUnit. Enhance tests for array
(code coverage for Modules/arraymodule.c is at 91%)

From SF patch #736962.
2003-05-18 00:47:47 +00:00
Kurt B. Kaiser a2792bec1d Show Freddy the mirror
i.e. improve subprocess exit paths and exeception reporting
2003-05-17 21:04:10 +00:00
Raymond Hettinger 74e67661a6 User cStringIO instead of StringIO. 2003-05-17 20:44:12 +00:00
Brett Cannon c8b188a9e2 Revert some changes back to dict.items made in a previous patch. 2003-05-17 19:51:26 +00:00
Tim Peters b0c854d6a7 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.
2003-05-17 15:57:00 +00:00
Tony Lownds 108c40c74c Added icon for IDLE on OS X 2003-05-17 15:14:10 +00:00
Samuele Pedroni 72c5c77ce1 minor fix, jython-only. Don't asssume stdout to save is the ur-stdout. 2003-05-17 12:51:10 +00:00
Tim Peters a98924a063 datetime.datetime and datetime.time can now be subclassed in Python. Brr. 2003-05-17 05:55:19 +00:00
Kurt B. Kaiser 63af08aa93 Nigel Rowe's Patch
[ 735527 ] Re Bug [ 678325 ] ParenMatching Missing AutoIndent

AutoIndent was merged with EditorWindow, this patch corrects
the references in ParenMatch.
2003-05-17 03:51:57 +00:00
Kurt B. Kaiser a80d57c41d 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
2003-05-17 03:15:48 +00:00
Skip Montanaro ab0053aa13 simpler temp dir cleanup 2003-05-17 02:54:11 +00:00
Samuele Pedroni de9a0d3158 beefed up version: jython support, covers now fixed differences between CPython/Jython. 2003-05-17 02:39:52 +00:00
Tim Peters eb1a496039 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).
2003-05-17 02:25:20 +00:00
Raymond Hettinger 1ba24b4fbb Include module name in doctest summary. 2003-05-17 01:59:57 +00:00
Raymond Hettinger 627728acbc Use test_support.run_doctest() 2003-05-17 01:08:35 +00:00
Raymond Hettinger 35b34bd326 Provide a clue that the doctests have run. 2003-05-17 00:58:33 +00:00
Raymond Hettinger 929f06c570 Minor cleanups. 2003-05-16 23:16:36 +00:00
Marc-André Lemburg 2820125935 Remove usage of re module from encodings package search function. 2003-05-16 17:07:51 +00:00
Tim Peters 813cec9a62 test_fileno(): Skip this test on Windows. 2003-05-16 15:35:10 +00:00
Guido van Rossum fa19f7c20d More fixes according to SF 549151:
- When redirecting, always use GET.  This is common practice and
  more-or-less sanctioned by the HTTP standard.

- Add a handler for 307 redirection, which becomes an error for POST,
  but a regular redirect for GET and HEAD.
2003-05-16 01:46:51 +00:00
Guido van Rossum 993bc3a708 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).
2003-05-16 01:24:30 +00:00
Kurt B. Kaiser 11659ade1e 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)

M PyShell.py
M ScriptBinding.py
2003-05-15 23:23:21 +00:00
Kurt B. Kaiser 8f570a768f 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

M PyShell.py
M help.txt
2003-05-15 18:52:51 +00:00
Kurt B. Kaiser 5db4843c5e 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.
2003-05-15 03:40:51 +00:00
Kurt B. Kaiser 7f38ec0849 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 :).

M NEWS.txt
M PyShell.py
M ScriptBinding.py
2003-05-15 03:19:42 +00:00
Marc-André Lemburg f0b5d174c1 Restore Python 1.5.2 compatibility. 2003-05-14 19:48:57 +00:00
Kurt B. Kaiser aa6b856a42 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.

Modified Files: run.py
2003-05-14 18:15:40 +00:00
Skip Montanaro d8f21203b0 defer re module imports to help improve interpreter startup 2003-05-14 17:33:53 +00:00
Fred Drake 9c43910a27 - add a dump_stats() method similar to that of the profile.Profile class
- don't use "file" as the name of local variables
2003-05-14 14:28:09 +00:00
Brett Cannon a71319eebb Fleshed out tests for urllib requiring a network connection. 2003-05-14 02:18:31 +00:00
Brett Cannon abe8eb0a30 Call time.tzset (if available) just before calculating possible timezones from time.tzname. 2003-05-13 20:28:15 +00:00
Guido van Rossum bf1bef820c Add optional 'onerror' argument to os.walk(), to control error
handling.
2003-05-13 18:01:19 +00:00