Removed forgotten text in list comprehensions section (taken from the Haskell
description of listcomps and used as inspiration)
Rearranged sections (which accounts for much of the size of the diffs)
Added section on augmented assignment
Mentioned 'print >>file'
Broke up the "Core Changes" section into subsections
Fred Drake [Tue, 29 Aug 2000 18:15:05 +0000 (18:15 +0000)]
Add a --style option to allow specifying an alternate CSS style sheet for
HTML generation; the machinery was there but no option to set it was
defined.
Simplify some of the path-math since we can assume a recent version of
Python.
Fix for two problems on FreeBSD:
In test_poll1(), unregister file descriptors as they're closed,
and also close the read end of the pipe
In test_poll2(), make the code assume less about the combinations of flag
bits that will be returned
Barry Warsaw [Tue, 29 Aug 2000 04:56:13 +0000 (04:56 +0000)]
eval_code2(): Guido provides this patch for his suggested elaboration
of extended print. If the file object being printed to is None, then
sys.stdout is used.
Greg Ward [Tue, 29 Aug 2000 01:15:18 +0000 (01:15 +0000)]
Added 'script_name' and 'script_args' instance attributes to Distribution.
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
'self.distribution.script_name' rather than 'sys.argv[0]'.
Thomas Wouters [Sun, 27 Aug 2000 20:31:27 +0000 (20:31 +0000)]
Replace the run-time 'future-bytecode-stream-inspection' hack to find out
how 'import' was called with a compiletime mechanism: create either a tuple
of the import arguments, or None (in the case of a normal import), add it to
the code-block constants, and load it onto the stack before calling
IMPORT_NAME.
Guido van Rossum [Sun, 27 Aug 2000 19:21:52 +0000 (19:21 +0000)]
Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),
PyRun_FileEx(). These are the same as their non-Ex counterparts but
have an extra argument, a flag telling them to close the file when
done.
Then this is used by Py_Main() and execfile() to close the file after
it is parsed but before it is executed.
Adding APIs seems strange given the feature freeze but it's the only
way I see to close the bug report without incompatible changes.
[ Bug #110616 ] source file stays open after parsing is done (PR#209)
Tim Peters [Sat, 26 Aug 2000 08:24:18 +0000 (08:24 +0000)]
Another new test using "from test.test_support import ...", causing
subtle breakage on Windows (the test is skipped here, but the TestSkipped
exception wasn't recognized as such, because of duplicate copies of
test_support got loaded; so the test looks like a failure under Windows
instead of a skip).
Repaired the import, but
THIS TEST *WILL* FAIL ON OTHER SYSTEMS NOW!
Again due to the duplicate copies of test_support, the checked-in
"expected output" file actually contains verbose-mode output. I can't
generate the *correct* non-verbose output on my system. So, somebody
please do that.
Tim Peters [Sat, 26 Aug 2000 07:38:06 +0000 (07:38 +0000)]
Try to supply a prototype for the module init function but avoid
Windows "inconsistent linkage" warnings at the same time. I agree
with Mark Hammond that the whole DL_IMPORT/DL_EXPORT macro system
needs an overhaul; this is just an expedient hack until then.
Greg Ward [Sat, 26 Aug 2000 02:40:10 +0000 (02:40 +0000)]
New release of the Windows installer from Thomas Heller.
The known bug (bogus error message when an empty file is
extracted) is fixed.
Other changes:
- The target-compile and target-optimize flags of bdist_wininst
are gone. It is no longer possible to compile the python
files during installation.
- The zlib module is no longer required or used by bdist_wininst.
- I moved the decompression/extraction code into a separate
file (extract.c).
- The installer stub is now compressed by UPX (see
http://upx.tsx.org/). This reduces the size of the exe
(and thus the overhead of the final installer program)
from 40 kB to 16 kB.
- The installer displays a more uptodate user wizard-like
user interface, also containing a graphic: Just's Python Powered logo.
(I could not convince myself to use one of the BeOpen logos).
- The installation progress bar now moves correctly.
Fix to bug [ Bug #111860 ] file.writelines() crashes.
file.writelines() now tries to emulate the behaviour of file.write()
as closely as possible. Due to the problems with releasing the
interpreter lock the solution isn't exactly optimal, but still better
than not supporting the file.write() semantics at all.
Jack Jansen [Fri, 25 Aug 2000 22:25:54 +0000 (22:25 +0000)]
Added routine DlgObj_ConvertToWindow().
GetDialogWindow() returns an existing window.
Added a comment that the methodchain Dialogs->Windows is suspect under Carbon/MacOSX, but we need it under Carbon. No solution yet:-(
Jack Jansen [Fri, 25 Aug 2000 22:17:51 +0000 (22:17 +0000)]
Window objects now also have an AutoDispose funcpointer (set for our windows, cleared for foreign windows). Needed mainly for Carbon (where we don't know about the windows belonging to our dialogs).
Fixed a few calls that return an ExistingWindow.
Jack Jansen [Fri, 25 Aug 2000 22:02:44 +0000 (22:02 +0000)]
Don't use our own malloc any more. It made test_longexp crash due to its optimization to lock blocks into a specific size malloc requests. This loses 15% performance, but that we'll have to live with:-(
Barry Warsaw [Fri, 25 Aug 2000 19:53:17 +0000 (19:53 +0000)]
Group consensus is that supporting alternative locale categories is
useless. So the category argument on _find() is removed, as is the
dcgettext() function.
Barry Warsaw [Fri, 25 Aug 2000 19:50:38 +0000 (19:50 +0000)]
Set this test up so that we don't have to create xx/LC_MESSAGES in the
cvs tree. It creates the directory and gettext.mo file on the fly,
from the base64 encode binary data.
Tim Peters [Fri, 25 Aug 2000 06:52:44 +0000 (06:52 +0000)]
In readme.txt, make what's needed to build the "optional" subprojects
much more explicit. Also document that we're moving to Tcl/Tk 8.3.2.
Simplify .dsp files by getting rid of useless include paths.
.wse file changed to reflect that my setup is different than Guido's:
if you *build* a Python distro using python20.wse, beware!
Thomas Wouters [Fri, 25 Aug 2000 05:41:11 +0000 (05:41 +0000)]
Fix allowable node-types for assignment, need to add 'listmaker'.
(This fix is a bit broken, just as the test already was: the test for
testlist and listmaker are done always, whereas the test for exprlist and
the actual abort() are only done if Py_DEBUG is defined. Suggestions
welcome, I guess ;)
Thomas Wouters [Thu, 24 Aug 2000 20:14:10 +0000 (20:14 +0000)]
Support for augmented assignment in the UserList, UserDict, UserString and
rfc822 (Addresslist) modules. Also a preliminary testcase for augmented
assignment, which should actually be merged with the test_class testcase I
added last week.
Thomas Wouters [Thu, 24 Aug 2000 20:11:32 +0000 (20:11 +0000)]
Support for three-token characters (**=, >>=, <<=) which was written by
Michael Hudson, and support in general for the augmented assignment syntax.
The graminit.c patch is large!
Thomas Wouters [Thu, 24 Aug 2000 20:08:19 +0000 (20:08 +0000)]
Support for the in-place operations introduced by augmented assignment. Only
the list object supports this currently, but other candidates are
gladly accepted (like arraymodule and such.)
Guido van Rossum [Thu, 24 Aug 2000 16:20:32 +0000 (16:20 +0000)]
Addresses the other half of Bug #112634 -- the documentation suggested
that you can set self.version *after* calling the base class __init__.
In fact it must be done *before*.
(Fred, maybe the version class variable should be documented now?)
Guido van Rossum [Thu, 24 Aug 2000 16:18:04 +0000 (16:18 +0000)]
Promote the server version from a local variable to a class variable,
so that a subclass can override it.
This partly addresses Bug #112634 -- but the documentation is still
wrong, since it suggests that you can set self.version *after* calling
the base class __init__. In fact it must be done *before*.