Commit Graph

26453 Commits

Author SHA1 Message Date
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
Just van Rossum
4983331385 tweak error message 2003-02-25 21:08:12 +00:00
Just van Rossum
7215e08846 - renamed the --copyfile option to --file.
- tweaked the help text a little.
(Jack: up to you to change your client code.)
2003-02-25 21:00:55 +00:00
Just van Rossum
8a3ed3f81e added some comments, minor tweaks 2003-02-25 20:53:12 +00:00
Just van Rossum
5bfba3aeb9 Addendum to #683658:
import warnings.py _after_ site.py has run. This ensures that site.py
is again the first .py to be imported, giving it back full control over
sys.path.
2003-02-25 20:25:12 +00:00
Just van Rossum
7322b1ad46 Resolving parts of #688907:
- Replaced bootstrap shell script with Python script. This means
  standalone apps built with bundlebuilder will not work on MacOS < 10.1,
  since we depend (again) on an installed Python.
- Add a hack to set sys.executable; the bootstrap script does os.execve()
  with an argv[0] that's different from the actual Python executable
  (it has to match the CFBundleExecutable entry in the Info.plist to make
  the app work both from the Finder and the command line, and it has to be
  the bootstrap script), yet a proper sys.executable is needed to spawn
  auxiliary processes.
2003-02-25 20:15:40 +00:00
Skip Montanaro
74b9a7a71f typo 2003-02-25 17:48:15 +00:00
Skip Montanaro
12fe72e9df note the demise of the dospath module (was actually in 2.3a2) 2003-02-25 17:46:20 +00:00
Jack Jansen
c00b6d7a0a Added an "Open Recent" command. Fixes 607810. 2003-02-25 15:08:02 +00:00
Jack Jansen
f4a9ac25e9 Workaround for bug #644243 (which is actually an Apple bug, I think): URLs
of the form file:/path/to/file don't work whereas file:///path/to/file
works fine. We convert the former to the latter.
2003-02-25 13:34:22 +00:00
Jack Jansen
c28fc37ed1 Refer to the Mac OS X bundle_loader by the altbininstall name, so that
building distutils extension modules also works if you've only done
an altinstall. Fixes bug #677293.
2003-02-25 13:14:43 +00:00
Jack Jansen
838e76af2c Test suite for the plistlib module. 2003-02-25 12:58:58 +00:00
Jack Jansen
04087b56ec In Mac OS X framework builds don't assume that the executable will be
called python.exe but actually pass it from the main Makefile to
Mac/OSX/Makefile. This makes framework builds work again on case
sensitive filesystems. Fixes bug #677753.
2003-02-25 12:41:10 +00:00
Walter Dörwald
dd8766a65b Change the test encoding from "ISO8859-1" to "ISO-8859-1"
(see SF bug #690309) and raise ImportErrors instead of
RuntimeErrors, so building Python continues even
if importing iconv_codecs fails.

This is a temporary fix until we get proper configure
support for "broken" iconv implementations.
2003-02-24 20:17:32 +00:00
Guido van Rossum
0f69833396 2.3b1 patches 2003-02-24 17:55:37 +00:00
Jack Jansen
ec43f64092 Fix building of Idle applet. 2003-02-24 16:30:24 +00:00
Jack Jansen
af1d4225b8 Allow specifiying the destination for --extra files (default: same
filename as the source, but in Contents/Resources in the app bundle).
2003-02-24 16:28:37 +00:00
Jack Jansen
00cbf07ca7 Added a -c (--copyfile) option with argument src:dst which copies file src
into dst in the bundle. The Python API already had this functionality
2003-02-24 16:27:08 +00:00
Walter Dörwald
b671c0c418 Remove unused variables. 2003-02-24 15:33:31 +00:00
Jack Jansen
0c44c0477b sys.executable can contain spaces, cater for this when passing it to
os.popen(). Fixes #692222.
2003-02-24 15:26:39 +00:00
Jack Jansen
9ce623fce5 That fix was bogus, undone. The problem is that the iconv include file
is found if you are running fink, but the module doesn't work. For now
I disabled building iconv_codec on darwin.
2003-02-24 12:56:36 +00:00
Jack Jansen
70ec40befa The test for iconv_incs tested explicitly for None, but [] is returned
if the include files cannot be found.
2003-02-24 12:48:58 +00:00
Jack Jansen
deac2acdb8 Added a note about MacOS.WMAvailable(). 2003-02-24 11:04:17 +00:00
Jack Jansen
5860dab401 Documented linkmodel and WMAvailable(). 2003-02-24 11:02:36 +00:00
Neal Norwitz
937ca98e34 SF patch #687598, array.append is sloooow
This improves speed by about 5.6% for me.
2003-02-24 02:08:42 +00:00
Guido van Rossum
577fb5a1db Fix from SF patch #633359 by Greg Chapman for SF bug #610299:
The problem is in sre_compile.py: the call to
    _compile_charset near the end of _compile_info forgets to
    pass in the flags, so that the info charset is not compiled
    with re.U. (The info charset is used when searching to find
    the first character at which a match could start; it is not
    generated for patterns beginning with a repeat like '\w{1}'.)
2003-02-24 01:18:35 +00:00
Guido van Rossum
902a671c7b Deleting the 2.2 spec. 2003-02-24 01:12:54 +00:00