Commit graph

26698 commits

Author SHA1 Message Date
Ken Manheimer
ad428cd1cd Guard advancing past leading meta-comments. 2003-03-03 04:05:03 +00:00
Ken Manheimer
e7aca521db Enhanced pdbtrack to provide for source code that's not findable by
the reported path.  (Eg, precompiled scripts with a file path suitable
for a different host, scripts actually running on a remote system or
with no valid path, like Zope through-the-web python scripts.)

On failing to find the code on the reported path, pdbtrack takes the
function name and looks through the buffers, from most to least
recent, seeking the first python-mode buffer that either is named for
the function or has a definition (def or class) for that function.  So
to get source tracking for code that's not located where the path
indicates, you put a copy of the script in a buffer, and pdbtrack will
find it.

Also, fixed a small bug so pdbtrack now properly presents the overlay
arrow when you run the pdb 'w'here command.
2003-03-03 00:35:32 +00:00
Jack Jansen
ad5e76a8fb Use Carbon.File for FSSpec and FSRef conversion, not macfs. 2003-03-02 23:16:50 +00:00
Jack Jansen
d79284843a _CG module only needs the ApplicationServices framework, not Carbon. 2003-03-02 21:31:51 +00:00
Guido van Rossum
0df6442ae5 Undo the apply() removals; this code needs to run under Python 1.5.2. 2003-03-02 20:47:29 +00:00
Guido van Rossum
206b9a779a MyComplex now works. 2003-03-02 13:53:18 +00:00
Guido van Rossum
4eadfa2b2e Fix from Greg Chapman from SF bug #695651: a complex subclass
constructor, when passed a single complex argument, returns the
argument unchanged.  This should be done only for the complex base
class; a complex subclass should of course cast the value to the
subclass in this case.

The fix also revealed a segfault in complex_getnewargs(): the argument
for the Py_BuildValue() format code "D" is the *address* of a
Py_complex struct, not the value.  (This corroborated by the API
documentation.)

I expect this needs to be backported to 2.2.3.
2003-03-02 13:51:47 +00:00
Guido van Rossum
41bcbe3050 Commit MvL's doc patch for SF bug #221327. This adds an example of
calling into Python from a C thread.
2003-03-02 13:17:20 +00:00
Tim Peters
fc27375d5a test_load_from_canned_string(): Created a DATA2 string to test a canned
proto 2 pickle too.
2003-03-02 04:54:24 +00:00
Andrew M. Kuchling
563389fdee Add updates for alpha2 2003-03-02 02:31:58 +00:00
Andrew M. Kuchling
41c3e00851 Expand itertools paragraph 2003-03-02 02:13:52 +00:00
Tim Peters
6cca754c20 TestOnlySetsInBinaryOps: Simplified the non-inplace tests by using
assertRaises.  Fixed a repeated subtle bug in the inplace tests by
removing the possibilty that a self.fail() call could raise a
TypeError that the test catches by mistake.
2003-03-02 00:36:10 +00:00
Tim Peters
b7bfe4bea4 Typo repairs in new code. 2003-03-02 00:31:23 +00:00
Tim Peters
44f14b0399 SF bug 693121: Set == non-Set is a TypeError.
Allow mixed-type __eq__ and __ne__ for Set objects.  This is messier than
I'd like because Set *also* implements __cmp__.  I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent).  The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.
2003-03-02 00:19:49 +00:00
Tim Peters
3ba491e6b1 The doctest was printing Sets, but that's unreliable because set
elements get displayed in undefined dict order.  Use a Set subclass
instead (which arranges to sort the elements for display).
2003-03-01 23:33:34 +00:00
Neal Norwitz
f421e81e41 Fix comment, mode really is used 2003-03-01 22:58:00 +00:00
Neal Norwitz
4f959d2c73 Fix SF patch #695581, "returnself" -> "return self" 2003-03-01 15:22:41 +00:00
Neal Norwitz
d9efdc5b5a get_completer() takes no args 2003-03-01 15:19:41 +00:00
Guido van Rossum
c9fbb72ba5 Added implementation notes for [re]set_exc_info(). 2003-03-01 03:36:33 +00:00
Guido van Rossum
d6473d1ac5 Reindent the new code properly. 2003-03-01 03:25:41 +00:00
Guido van Rossum
46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Raymond Hettinger
d1a283be26 Several of the tools can make direct calls the inner iterators. 2003-03-01 01:48:24 +00:00
Raymond Hettinger
8049dde8d7 Removed duplicate test from inner loop.
The PyIter_Check is already performed by PyObject_GetIter.
2003-03-01 01:44:32 +00:00
Andrew M. Kuchling
6f177d434f Add news item for patch #695090 2003-02-28 22:09:33 +00:00
Andrew M. Kuchling
e557f3556f [Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages 2003-02-28 22:03:04 +00:00
Neal Norwitz
6156a2d07c Handle iconv initialization erorrs 2003-02-28 20:00:42 +00:00
Neal Norwitz
55b61d21d8 Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resource
require -u network to run test_timeout since
it fails when not connected to a network.
2003-02-28 19:57:03 +00:00
Neal Norwitz
6e2d1c7ab8 Just pointed out the code was better written with
try: # ...
        except ImportError, why:
        except: # ...
All other changes are re-indenting/formatting.
2003-02-28 17:39:42 +00:00
Neal Norwitz
2c92c6e1f4 Fix SF bug #690012 2003-02-28 17:24:00 +00:00
Neal Norwitz
3f5fcc8acc Fix SF bug #690012 (among others), iconv_codec stops build
Change setup.py to catch all exceptions.
  - Rename module if the exception was an ImportError
  - Only warn if the exception was any other error

Revert _iconv_codec to raising a RuntimeError.
2003-02-28 17:21:39 +00:00
Barry Warsaw
edaa071eb4 compile_atom(): Neal's last checkin removing the setting of i broke
the build, so I'm restoring it.  I'm not sure what Neal's intent was,
since the line following the one he removed was "REQN(i, 1)" so i is
obviously used. ;)
2003-02-28 15:27:40 +00:00
Jack Jansen
d5532affd8 Check modes on install and temporary directories. Fixes #693230. 2003-02-28 15:19:51 +00:00
Jack Jansen
f1728713cc Removed silly print. 2003-02-28 15:18:59 +00:00
Guido van Rossum
d41eea05f4 SF doc patch #692001, properties and __getattribute__. I added some
stuff, and changed 'property' to 'descriptor'.
2003-02-28 14:11:45 +00:00
Jack Jansen
d00c13a9be Moved the Apple workaround for the guard define for wchar_t out of
the #ifdef HAVE_NCURSES_H: the same problem exists on OSX 10.1 with
a fink-installed curses (which uses curses.h as the include file name).
2003-02-28 12:51:18 +00:00
Just van Rossum
f4ecc751b1 use proper constant instead of comment (noted by nnorwitz) 2003-02-28 08:54:01 +00:00
Raymond Hettinger
a72e2f9d10 Fix spelling and grammar. 2003-02-28 05:11:03 +00:00
Neal Norwitz
5f16a3178c Remove setting i since it isn't used. Found in unrelated bug 690012. 2003-02-28 03:16:07 +00:00
Neal Norwitz
e9c571f968 Fix SF bug #694816, remove comparison of unsigned value < 0 2003-02-28 03:14:37 +00:00
Jack Jansen
c60968929e In make clobber also clean out the Python.framework. 2003-02-27 23:19:46 +00:00
Jack Jansen
98fc683719 Getting rid of macfs. 2003-02-27 23:18:46 +00:00
Jack Jansen
abeb7d5f7f Added a deprecation warning. 2003-02-27 23:17:59 +00:00
Kurt B. Kaiser
86bc464414 M rpc.py
M run.py

Move exception formatting out of rpc.py.  This allows each end of the
link to format and print exceptions how and where it sees fit and makes it
easier for threads to display their own exceptions.
2003-02-27 23:04:17 +00:00
Jack Jansen
4213e27616 Added a note about EasyDialogs dialogs having become movable. 2003-02-27 22:52:58 +00:00
Jack Jansen
f92ec2d191 StdFilterProc() uses InOut parameters. 2003-02-27 22:50:50 +00:00
Jack Jansen
fb3c811d9b Changing the window type to movable modal isn't enough to make the dialogs movable: apprently you also need to set a bit in the dlgx resource. Did this. 2003-02-27 22:36:20 +00:00
Skip Montanaro
19c6ba3664 * separate opcode definitions into opcode.py
* add disassemble_string
* allow classes and strings containing bytecode to be disassembled
2003-02-27 21:29:27 +00:00
Skip Montanaro
3249ccd06a new opcode module - extract opcode definitions from dis.py - eventually
should be generated automatically
2003-02-27 21:27:52 +00:00
Skip Montanaro
add0ccc251 simple test case for dis module 2003-02-27 21:27:07 +00:00
Guido van Rossum
68468eba63 Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00