Jeremy Hylton [Tue, 28 Mar 2000 23:49:17 +0000 (23:49 +0000)]
slightly modified version of Greg Ewing's extended call syntax patch
executive summary:
Instead of typing 'apply(f, args, kwargs)' you can type 'f(*arg, **kwargs)'.
Some file-by-file details follow.
Grammar/Grammar:
simplify varargslist, replacing '*' '*' with '**'
add * & ** options to arglist
Include/opcode.h & Lib/dis.py:
define three new opcodes
CALL_FUNCTION_VAR
CALL_FUNCTION_KW
CALL_FUNCTION_VAR_KW
Python/ceval.c:
extend TypeError "keyword parameter redefined" message to include
the name of the offending keyword
reindent CALL_FUNCTION using four spaces
add handling of sequences and dictionaries using extend calls
fix function import_from to use PyErr_Format
Guido van Rossum [Tue, 28 Mar 2000 21:42:38 +0000 (21:42 +0000)]
Fredrik Lundh:
The new filecmp module has an optional argument called use_statcache
which is documented as a true/false value, but used as an tuple index.
This patches replaces the tuple stuff with a good old if- statement,
and also removes a few other tuple pack/unpack constructs (if not
else, this saves a few bytes in the PYC file, and a few microseconds
when using the module ;-).
Guido van Rossum [Tue, 28 Mar 2000 20:29:59 +0000 (20:29 +0000)]
Marc-Andre Lemburg:
The attached patch set includes a workaround to get Python with
Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause
is a bug in the BSDI wchar.h header file) and Python interfaces
for the MBCS codec donated by Mark Hammond.
Also included are some minor corrections w/r to the docs of
the new "es" and "es#" parser markers (use PyMem_Free() instead
of free(); thanks to Mark Hammond for finding these).
The unicodedata tests are now in a separate file
(test_unicodedata.py) to avoid problems if the module cannot
be found.
Guido van Rossum [Tue, 28 Mar 2000 20:07:05 +0000 (20:07 +0000)]
Patch by Neil Schemenauer to remove support for Tcl/Tk versions before
8.0. There really is no excuse, and for who really still wants those,
they can go back to Python 1.5.2.
Just van Rossum [Tue, 28 Mar 2000 12:05:13 +0000 (12:05 +0000)]
- new version of PythonCGISlave
- new script/applet BuildCGIApplet
This largely supercedes :Mac:Demos:cgi, except for the html doc file. Should it move here? Merged with CGI_README.txt?
Todo: fullbuild support.
(jvr)
Guido van Rossum [Mon, 27 Mar 2000 21:46:29 +0000 (21:46 +0000)]
Add a call to Tcl_FindExecutable(). This was inspired by a patch by
Martin von Loewis (whose more elaborate patch to use objects is still
under review).
Guido van Rossum [Mon, 27 Mar 2000 19:29:31 +0000 (19:29 +0000)]
Skip Montanaro:
The robotparser.py module currently lives in Tools/webchecker. In
preparation for its migration to Lib, I made the following changes:
* renamed the test() function _test
* corrected the URLs in _test() so they refer to actual documents
* added an "if __name__ == '__main__'" catcher to invoke _test()
when run as a main program
* added doc strings for the two main methods, parse and can_fetch
* replaced usage of regsub and regex with corresponding re code
Greg Ward [Sun, 26 Mar 2000 21:45:14 +0000 (21:45 +0000)]
Fixed a bunch of screwed-up logic and inconsistent terminology.
Fixed 'build_extensions()' to pay attention to the 'rpath' element of the
'build_info' dictionary.
Greg Ward [Sun, 26 Mar 2000 21:42:28 +0000 (21:42 +0000)]
Added 'runtime_library_dirs' parameter to 'link_*()' methods, and warn that
we don't know what to do with it when we see it.
Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather
than just '_fix_link_args()'.
Greg Ward [Sun, 26 Mar 2000 21:40:19 +0000 (21:40 +0000)]
Added 'runtime_library_dirs' parameter to 'link_*()' methods, and changed to
use it when linking.
Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather
than just '_fix_link_args()'.
Greg Ward [Sun, 26 Mar 2000 21:37:09 +0000 (21:37 +0000)]
Added 'runtime_library_dirs' parameter to 'link_*()' methods.
Split '_fix_link_args()' up into '_fix_object_args()' (for use of
'create_static_lib() and link methods) and '_fix_lib_args()' (for the
link methods only).
Just van Rossum [Sun, 26 Mar 2000 10:12:26 +0000 (10:12 +0000)]
realcgitest.py: added import MacOS, it now works again. Removed NetPresenz reference.
cgitest.cgi.rsrc: disable argv emulation; this is essential for the first time the cgi applet starts up
Guido van Rossum [Fri, 24 Mar 2000 22:14:19 +0000 (22:14 +0000)]
Marc-Andre Lemburg:
Attached you find the latest update of the Unicode implementation.
The patch is against the current CVS version.
It includes the fix I posted yesterday for the core dump problem
in codecs.c (was introduced by my previous patch set -- sorry),
adds more tests for the codecs and two new parser markers
"es" and "es#".
Guido van Rossum [Fri, 24 Mar 2000 20:52:23 +0000 (20:52 +0000)]
Marc-Andre Lemburg:
Andy Robinson noted a core dump in the codecs.c file. This
was introduced by my latest patch which fixed a memory leak
in codecs.c. The bug causes all successful codec lookups to fail.
Fix probable bug; if errno == EINTR, floatsleep() doesn't break out of
a Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS block, but it
calls Py_BLOCK_THREADS anyway. The change moves Py_BLOCK_THREADS
to inside the if, so it's only executed when the function
actually returns unexpectedly.
Greg Ward [Wed, 22 Mar 2000 00:30:54 +0000 (00:30 +0000)]
Dropped any notion of allowing the user to specify the build directories:
these must come from the 'build' command. This means we no longer need
the misconceived 'set_peer_option()' method in Command and, more importantly,
sweeps away a bunch of potential future complexity to handle this tricky
case.
Greg Ward [Wed, 22 Mar 2000 00:20:46 +0000 (00:20 +0000)]
Renamed 'install_path' to 'extra_path'.
Fix 'Command.set_undefined_option()' to call 'ensure_ready()' rather
than 'finalize_options()' (which is only supposed to be called once,
which is the whole point of 'ensure_ready()').
Added comment to 'set_peer_option()' to remind myself that this method
cannot work and is fundamentally wrong-headed.
Greg Ward [Wed, 22 Mar 2000 00:15:45 +0000 (00:15 +0000)]
Yet another complete rewrite. Hopefully the *last* complete rewrite of
this command for a while; this implements roughly the plan cooked up by
Guido, Fred, and me. Seems to strike a nice balance between usability in
the common cases (just set one option), expandability for more types of
files to install in future, and customizability of installation
directories.
This revision isn't completely working: standard and alternate
installations work fine, but there are still some kinks to work out of
customized installations.
Greg Ward [Wed, 22 Mar 2000 00:11:21 +0000 (00:11 +0000)]
Took out what looks like old debugging code that probably should never
have been checked in: was passing the PLAT environment variable as the
'plat' argument to 'new_compiler()'.
Barry Warsaw [Mon, 20 Mar 2000 16:36:48 +0000 (16:36 +0000)]
On 17-Mar-2000, Marc-Andre Lemburg said:
Attached you find an update of the Unicode implementation.
The patch is against the current CVS version. I would appreciate
if someone with CVS checkin permissions could check the changes
in.
The patch contains all bugs and patches sent this week and also
fixes a leak in the codecs code and a bug in the free list code
for Unicode objects (which only shows up when compiling Python
with Py_DEBUG; thanks to MarkH for spotting this one).
Greg Ward [Sat, 18 Mar 2000 17:35:12 +0000 (17:35 +0000)]
Oops! Don't call 'ensure_ready()' in 'Distribution.find_command_obj()' --
that broke parsing command-line options. Instead call it in
'Command.find_peer()', which is why I added it to 'find_command_obj()'
in the first place.
Greg Ward [Sat, 18 Mar 2000 17:33:18 +0000 (17:33 +0000)]
Tweaked all over:
* improve help strings
* warn if user supplies non-existing directories
* don't try to 'remove_tree()' non-existing directories
* try to remove the build_base after cleanup (but don't do or say
anything if it fails -- this is just in case we made it empty)
Greg Ward [Sat, 18 Mar 2000 15:19:51 +0000 (15:19 +0000)]
Changed to pay attention to the 'runtime_library_dirs' list (= 'rpath'
option in the 'build_ext' command):
* in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs'
parameter
* in unixccompiler.py and msvccompiler.py: now pass
'self.runtime_library_dirs' to 'gen_lib_options()', and define
'runtime_library_dir_option()' (although in msvccompiler.py it
blows up with a DistutilsPlatformError right now!)
Greg Ward [Sat, 18 Mar 2000 15:11:50 +0000 (15:11 +0000)]
Third attempt at documenting an installation scheme; this one feels like
it could work--reasonably short and straightforward to document, but
flexible enough that it will be able to handle more than just modules
and extensions in the future.
Jack Jansen [Fri, 17 Mar 2000 16:49:59 +0000 (16:49 +0000)]
Added a method GetMediaNextInterestingTimeOnly, which is like GetMediaNextInterestingTime without asking for the duration (which is, according to qt docs, expensive).
Jeremy Hylton [Thu, 16 Mar 2000 20:04:16 +0000 (20:04 +0000)]
simplify visitor walker class
- remove postorder
- remove protocol for automatically walking children based on visitor
method return value; now only walks if there is no method
Guido van Rossum [Mon, 13 Mar 2000 16:27:06 +0000 (16:27 +0000)]
Checking in the new, improve file.writelines() code.
This (1) avoids thread unsafety whereby another thread could zap the
list while we were using it, and (2) now supports writing arbitrary
sequences of strings.
Guido van Rossum [Mon, 13 Mar 2000 16:01:29 +0000 (16:01 +0000)]
Christian Tismer's "trashcan" patch:
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c,
frameobject.c, traceback.c that safely prevends core dumps
on stack overflow. Macros and functions in object.c, object.h.
The method is an "elevator destructor" that turns cascading
deletes into tail recursive behavior when some limit is hit.
Guido van Rossum [Mon, 13 Mar 2000 15:41:59 +0000 (15:41 +0000)]
Added Christian Tismer's patch to allow list.append(a,b,c) back --
with a twist: you have to define NO_STRICT_LIST_APPEND manually
to enable multi-arg append().
Guido van Rossum [Fri, 10 Mar 2000 23:22:10 +0000 (23:22 +0000)]
Marc-Andre Lemburg: the maxsplit argument for split() and replace()
now defaults to -1, not to 0. Passing an explicit zero doesn't split
or replace at all.