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*.
Fred Drake [Thu, 24 Aug 2000 01:06:40 +0000 (01:06 +0000)]
Moshe Zadka <moshez@math.huji.ac.il>:
Documentation updates for urlretrieve() and URLopener.retrieve(), to
reflect Randall Hopper's patch for those functions.
Fred Drake [Thu, 24 Aug 2000 00:50:27 +0000 (00:50 +0000)]
Make sure Thomas Wouters has enough to do. ;-)
(Some of this is in-progress; this also serves as a reminded to me to
check this out once it is written.)
Fred Drake [Thu, 24 Aug 2000 00:32:09 +0000 (00:32 +0000)]
Charles G. Waldman <cgw@fnal.gov>:
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit. This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.
This closes the implementation portion of SourceForge patch #100893.
Thomas Wouters [Wed, 23 Aug 2000 23:16:10 +0000 (23:16 +0000)]
Add extra check on whether 'tp_as_number' is still non-NULL after coercion,
in the PyNumber_* functions. Also, remove unnecessary tests from
PyNumber_Multiply: after BINOP(), neither argument can be an instance.
Trent Mick [Wed, 23 Aug 2000 21:33:05 +0000 (21:33 +0000)]
This patch partly (some stuff went in already) ports Python to Monterey.
- Fix bug in thread_pthread.h::PyThread_get_thread_ident() where
sizeof(pthread) < sizeof(long).
- Add 'configure' for:
- SIZEOF_PTHREAD is pthread_t can be included via <pthread.h>
- setting Monterey system name
- appropriate CC,LINKCC,LDSHARED,OPT, and CCSHARED for Monterey
- Add section in README for Monterey build
Guido van Rossum [Wed, 23 Aug 2000 19:01:43 +0000 (19:01 +0000)]
Updated some URLs; removed mention of copyright (we'll have to add
something in later after that discussion is over); remove explanation
of 2.0 version number.