Commit Graph

26529 Commits

Author SHA1 Message Date
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
Guido van Rossum f389c77273 Use floor division (// and __[r]floordiv__ in right-dispatch test. 2003-02-27 20:04:19 +00:00
Guido van Rossum f359410ce2 Use floor division (//). 2003-02-27 18:39:18 +00:00
Michael W. Hudson e46d1559c9 In the process of adding all the extended slice support I attempted to
change _PyEval_SliceIndex to round massively negative longs up to
-INT_MAX, instead of 0 but botched it.  Get it right.

Thx to Armin for the report.
2003-02-27 14:50:34 +00:00
Mark Hammond ce56c377a0 When bad HTML is encountered, ignore the page rather than failing with
a traceback.
2003-02-27 06:59:10 +00:00
Raymond Hettinger 05595e9d73 Module review:
* Changed variable name from 'list' to 'flist'.
* Replaced "while 1" with "while True".
* Replaced if/elif/elif/elif structure with a shorter and
  faster dispatch dictionary that maps attrs to methods.
* Simplified and sped comparison logic by using
  ifilter, ifilterfalse, and dict.fromkeys.
* Used True and False rather than 1 and 0.
2003-02-27 00:05:31 +00:00
Raymond Hettinger b2e0b92ef1 Module review:
* Replaced "while 1" with "while True"
* Rewrote read() and readline() for clarity and speed.
* Replaced variable 'list' with 'hlist'
* Used augmented assignment in two places.
2003-02-26 22:45:18 +00:00
Fred Drake 479d280218 The macfs, macostools, and plistlib should not be expected to run
beyond Mac OS and Darwin.  I'm not even sure they should be run on
Darwin, but I'll let someone more knowledgable on that tell us.
2003-02-26 19:51:23 +00:00
Andrew M. Kuchling c61402ba26 Update PyPI link 2003-02-26 19:00:52 +00:00
Andrew M. Kuchling b6b4613ae4 [Bug #693474, reported by Stuart Bishop]
Fix errors in the list of setup() arguments
2003-02-26 18:58:46 +00:00
Andrew M. Kuchling 10da45e237 [Bug #668662] Patch from Pearu Pearson: if a C source file is
specified with an absolute path, the object file is also
    written to an absolute path.  The patch drops the drive and
    leading '/' from the source path, so a path like /path/to/foo.c
    results in an object file like build/temp.i686linux/path/to/foo.o.
2003-02-26 18:52:07 +00:00
Raymond Hettinger 21012b8235 Micro-optimizations.
* List/Tuple checkexact is faster for the common case.
* Testing for Py_True and Py_False can be inlined for faster looping.
2003-02-26 18:11:50 +00:00
Just van Rossum a006b8e468 use bare raise so you get the original tb 2003-02-26 15:28:17 +00:00
Walter Dörwald 37c4728c64 Port test_ucn and test_unicodedata to PyUnit. Add a few tests for error
cases increasing coverage in unicodedata.c from 87% to 95%
(when the normalization tests are run). From SF patch #662807.
2003-02-26 14:49:41 +00:00
Just van Rossum 0ff7a4e7c1 use the same Python for running the bootstrap script and the main program 2003-02-26 11:27:56 +00:00
Just van Rossum ddf5283ad1 remove sitecustomize hack, will be solved elsewhere 2003-02-26 11:07:59 +00:00
Jack Jansen ec396a11e0 Let's try making the dialogs at least Movable Modal. 2003-02-25 23:35:06 +00:00
Jack Jansen cba861e5e3 If a resource file cannot be decoded because the directory is readonly
create a temporary file. This fixes #688011.

Got rid of the install() method in macresource, and replaced it with
a resource_filename() method which will optionally decode a given resourcefile
(which may be applesingle-encoded) and return the real resourcefile.

Use this new method in buildtools to copy the correct resource file to
the bundle. This fixes #688007.
2003-02-25 23:02:03 +00:00
Jack Jansen ade626464d Reverted the rev. 1.8 change: the magic for decoding resourcefiles
is now in buildtools.
2003-02-25 22:58:33 +00:00
Just van Rossum 46c9784f68 Patch #683592: unicode support for os.listdir()
os.listdir() may now return unicode strings on platforms that set
Py_FileSystemDefaultEncoding.
2003-02-25 21:42:15 +00:00