Jack Jansen [Fri, 13 Oct 2000 23:33:34 +0000 (23:33 +0000)]
If we're installing to another partition than the system partition offer to copy PythonCore in stead of aliasing it. This should fix the applet problems some people have.
Jeremy Hylton [Fri, 13 Oct 2000 21:58:13 +0000 (21:58 +0000)]
Now supports entire Python 2.0 language and still supports Python
1.5.2. The compiler generates code for the version of the interpreter
it is run under.
ast.py:
Print and Printnl add dest attr for extended print
new node AugAssign for augmented assignments
new nodes ListComp, ListCompFor, and ListCompIf for list
comprehensions
pyassem.py:
add work around for string-Unicode comparison raising UnicodeError
on comparison of two objects in code object's const table
pycodegen.py:
define VERSION, the Python major version number
get magic number using imp.get_magic() instead of hard coding
implement list comprehensions, extended print, and augmented
assignment; augmented assignment uses Delegator classes (see
doc string)
fix import and tuple unpacking for 1.5.2
transformer.py:
various changes to support new 2.0 grammar and old 1.5 grammar
add debug_tree helper than converts and symbol and token numbers
to their names
Neil Schemenauer [Fri, 13 Oct 2000 01:32:42 +0000 (01:32 +0000)]
Make the regrtest.py -l (findleaks) option considerably less obnoxious.
First, only report garbage that the GC cannot free. Second, only report
the number of objects found, not their repr(). People can dig deeper on
their own if they find a leak.
Jeremy Hylton [Thu, 12 Oct 2000 20:23:23 +0000 (20:23 +0000)]
Fix SF bug #116263: support for from .. import *
transformer.py: return '*', None from com_import_as_name
pycodegen.py: special case for name == '*'
pyassem.py: fix stack counting for IMPORT_ opcodes
Thomas Heller [Thu, 12 Oct 2000 19:31:13 +0000 (19:31 +0000)]
Recreated after installer source code changes.
This should close SF bug (patch)
http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470
Jeremy Hylton [Thu, 12 Oct 2000 18:54:18 +0000 (18:54 +0000)]
two fixes for redirects:
- don't close the fp, since that appears to also close the socket
- join the original url with the redirect reponse to deal with
relative redirect URL
wrap two socket ops in try/except to turn them into URLErrors, so that
client code need only catch one exception.
in HTTPError.__del__ only close fp if fp is not None
style changes:
- use f(*args) instead of apply(f, args)
- use __super_init instead of super.__init__(self, ...)
Guido van Rossum [Thu, 12 Oct 2000 17:14:46 +0000 (17:14 +0000)]
Fix for Bug #116453.
Direct use of interp->result is deprecated; changing this to
Tcl_GetStringResult(interp) everywhere fixed the problem of losing the
error message with TclError exceptions, on Windows.
Fred Drake [Thu, 12 Oct 2000 17:11:38 +0000 (17:11 +0000)]
When we know the compiler is GCC, always add the -Wall and
-Wstrict-prototypes options. This will make it a lot easier to keep
warnings under control in the first place in the future.
There is one known warning at this time, caught by the -Wstrict-prototypes
option. In Modules/main.c, the declaration of getopt() without parameters
gets a complaint (rightly) that it is not a proper prototype. The lack of
a complete prototype information should be corrected when the right
portability conditions have been identified.
Guido van Rossum [Thu, 12 Oct 2000 16:45:37 +0000 (16:45 +0000)]
[ Bug #116636 ] Bug in StringIO.write()
http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470
bobalex@rsv.ricoh.com
Bug report: If the file position is less than the end of the "file",
and a write is performed extending past then end of the file, the data
string is corrupted.
Solution: in write(), when writing past the end, properly set self.len
when newpos is > self.len.
Tim Peters [Thu, 12 Oct 2000 06:10:25 +0000 (06:10 +0000)]
Stop raising OverflowError on underflows reported by libm (errno==ERANGE and
libm result is 0). Cautiously add a few libm exception test cases:
1. That exp(-huge) returns 0 without exception.
2. That exp(+huge) triggers OverflowError.
3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
with -lieee, it was raising OverflowError due to an accident of the way
mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
Add new section on the XML package. (This was the only major new 2.0 feature
left that wasn't covered. The article is therefore now essentially complete.)
A few minor changes
Thomas Wouters [Wed, 11 Oct 2000 23:26:11 +0000 (23:26 +0000)]
Do a better job at staying on-screen :P (Sorry, it's late here.) I'm
assuming here that the ANSI-C adjacent-string-concatenation technique is
allowable, now that Python requires an ANSI C compiler.
Thomas Wouters [Wed, 11 Oct 2000 23:20:09 +0000 (23:20 +0000)]
Adjust debugging code in the implementation of the DUP_TOPX bytecode, use
Py_FatalError() instead, and clarify the message somewhat. As discussed on
python-dev.
Lars Gustäbel [Wed, 11 Oct 2000 22:34:04 +0000 (22:34 +0000)]
Added non-ns start and end element methods.
Moved appendChild calls from DOMEventStream to PullDOM (parser indep).
Removed duplicated sibling pointer setting (duplicated in appendChild).
Fred Drake [Wed, 11 Oct 2000 18:56:00 +0000 (18:56 +0000)]
Make sure methods of ZipFile objects are in alphabetical order; the logical
groupings are still maintained. Based on a comment by Steve Holden
<sholden@holdenweb.com>.
Fred Drake [Wed, 11 Oct 2000 13:54:07 +0000 (13:54 +0000)]
Remove the last gcc -Wall warning about possible use of an uninitialized
variable. w should be initialized before entering the bytecode
interpretation loop since we only need one initialization to satisfy the
compiler.
Tim Peters [Wed, 11 Oct 2000 07:04:49 +0000 (07:04 +0000)]
Attempt to fix bogus gcc -Wall warnings reported by Marc-Andre Lemburg,
by making the DUP_TOPX code utterly straightforward. This also gets rid
of all normal-case internal DUP_TOPX if/branches, and allows replacing one
POP() with TOP() in each case, so is a good idea regardless.
Fred Drake [Tue, 10 Oct 2000 21:10:35 +0000 (21:10 +0000)]
Avoid a couple of "value computed is not used" warnings from gcc -Wall;
these computations are required for their side effects in traversing the
variable arguments list.
Fred Drake [Tue, 10 Oct 2000 20:58:48 +0000 (20:58 +0000)]
Note that the UserString/MutableString classes are far less efficient
than the built-in string types (suggested by Moshe Zadka
<moshez@math.huji.ac.il>).
Clarified what "can be converted to a string" means.
Fred Drake [Tue, 10 Oct 2000 19:35:40 +0000 (19:35 +0000)]
Substantially revise to handle the fact that Python CVS is no longer in a
file-system accessible repository. Add a little bit of smarts to convert
the cvsroot to an anonymous cvsroot the real one requires an authenticated
login to SourceForge; this avoids the SSH startup delay when doing the
checkout or export to get a fresh copy of the tree.
Fred Drake [Tue, 10 Oct 2000 16:46:36 +0000 (16:46 +0000)]
Move the documentation for the mutex module to be with the threading
and queue-management modules, since that is where the general context
for use in most cases.
Tim Peters [Mon, 9 Oct 2000 23:43:55 +0000 (23:43 +0000)]
When the classes in wave.py opened files themselves, their .close() methods
didn't bother to close the files. This caused the new test_wave test to fail
under Windows, as Windows won't let you delete a file that's open. Fixed
that by ensuring the wave read & write classes' .close() and __del__ methods
close files that were opened by their constructors.
Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was
never written properly because the '4' length indicators for the 's'
format characters were missing.
Fred Drake [Mon, 9 Oct 2000 19:57:39 +0000 (19:57 +0000)]
Move the test for confirmation that all nodes have been freed into the
driver code, so that each test gets this; it had been done inconsistently.
Remove the lines that set the variables holding dom objects to None; not
needed since the interpreter cleans up locals on function return.