Tim Peters [Fri, 1 Sep 2000 03:34:26 +0000 (03:34 +0000)]
Revert removal of void from function definition. Guido sez I can take it
out again after we complete switching to C++ <wink>. Thanks to Greg Stein
for hitting me.
Now that StreamRequestHandler defaults rfile to buffered, make it
unbuffered (by setting the class variable rbufsize to 0), because we
(may) need to pass the file descriptor to the subprocess running the
CGI script positioned after the headers.
In class StreamRequestHandler, make the default buffering for rfile
and wfile class variables (that the instance can also override).
Change the default for rfile to buffered, because that seems to make a
big difference in performance on some platforms.
An anti-patch is needed to revert the effect in CGIHTTPServer.py which
I'll check in momentarily.
Jeremy Hylton [Fri, 1 Sep 2000 02:47:25 +0000 (02:47 +0000)]
refactor __del__ exception handler into PyErr_WriteUnraisable
add sanity check to gc: if an exception occurs during GC, call
PyErr_WriteUnraisable and then call Py_FatalEror.
Rene Liebscher/Thomas Heller:
* ensure the "dist" directory exists
* raise exception if using for modules containing compiled extensions
on a non-win32 platform.
* don't create an .ini file anymore (it was just for debugging)
Rene Liebscher:
* reverse library names from bcpp_library to library_bcpp
* move some code to the right places, to put the def-files
in the right directories again
Rene Liebscher: hack '_init_posix()' to handle the BeOS linker script.
(With a worry-wart comment added by me about where we *should* add the
Python library to the link.)
Added 'run_setup()' to allow outsiders to run a setup script under
fairly tight control, and the '_setup_stop_after' and '_setup_distribution'
globals to provide the tight control.
This isn't entirely reliable yet: it dies horribly with a NameError on the
example PIL setup script in examples/pil_setup.py (at least with Python
1.5.2; untested with current Python). There's some strangeness going
on with execfile(), but I don't understand it and don't have time
to track it down right now.
Tim Peters [Fri, 1 Sep 2000 00:01:58 +0000 (00:01 +0000)]
Supply missing prototypes for new Py_{Get,Set}RecursionLimit; fixes compiler wngs;
un-analize Get's definition ("void" is needed only in declarations, not defns, &
is generally considered bad style in the latter).
Jeremy Hylton [Thu, 31 Aug 2000 19:23:01 +0000 (19:23 +0000)]
add user-modifiable recursion_limit
ceval.c:
define recurion_limit (static), default value is 2500
define Py_GetRecursionLimit and Py_SetRecursionLimit
raise RuntimeError if limit is exceeded
PC/config.h:
remove plat-specific definition
sysmodule.c:
add sys.(get|set)recursionlimit
Fred Drake [Thu, 31 Aug 2000 19:04:07 +0000 (19:04 +0000)]
Clear errors raised by PyObject_Compare() without losing any existing
exception context. This avoids improperly propogating errors raised by
a user-defined __cmp__() by a subsequent lookup operation.
This patch does *not* include the performance enhancement patch for
dictionaries with string keys only; that will be checked in separately.
This closes SourceForge patch #101277 and bug #112558.
Fred Drake [Thu, 31 Aug 2000 17:23:35 +0000 (17:23 +0000)]
Document the limitation that urllib does not work with proxies which
require authenication. This is an implementation limitation rather than
required behavior, and may be fixed in the future.
Fred Drake [Thu, 31 Aug 2000 16:11:07 +0000 (16:11 +0000)]
Skip Montanaro <skip@mojam.com>:
Update the build structures to automatically detect the presence of BSD db,
including the proper name of the header file to include. Has all the
expected niceties associated with yet-more-configure-options. ;)
This checkin includes changes for non-generated files only; subsequent
checkin will catch those.
Fred Drake [Thu, 31 Aug 2000 15:21:11 +0000 (15:21 +0000)]
_PySys_Init(): When setting up sys.version_info, use #if/#elif.../#endif
instead of four #if/#endif blocks. This shortens the
code and improves readability.
Sjoerd Mullender [Thu, 31 Aug 2000 10:27:00 +0000 (10:27 +0000)]
New method getnamespace.
Since the application never gets to see the namespace abbreviation
used in the XML document, but some applications may need to know them,
we provide this method.
Fred Drake [Thu, 31 Aug 2000 07:19:07 +0000 (07:19 +0000)]
Be a little more careful to avoid including style information in the
generated markup.
Don't be careless with the navigation icons! We should use the blank
icon where there is not anyplace to go for a particular position in the
navigation bar.
Fred Drake [Thu, 31 Aug 2000 06:58:34 +0000 (06:58 +0000)]
Add --up-link and --up-title parameters to allow linking the top level
of the generated document to an external index. These correspond to the
-up_url and -up_title parameters of LaTeX2HTML.
Fred Drake [Thu, 31 Aug 2000 05:15:44 +0000 (05:15 +0000)]
Removed compiler warning about wanting explicit grouping around &&
expression next to a || expression; this is a readability-inspired
warning from GCC.
Greg Ward [Thu, 31 Aug 2000 00:31:07 +0000 (00:31 +0000)]
Add /GX to 'compile_options'. This is definitely needed for C++ source;
according to the MS docs it enables exception-handling, and (according
to Alex Martelli <aleaxit@yahoo.com>) is needed to compile without
getting warnings from standard C++ library headers. Apparently
it doesn't cause any problems with C code, so I haven't bothered
conditionalizing the use of /GX.
Skip Montanaro [Wed, 30 Aug 2000 14:01:28 +0000 (14:01 +0000)]
patches from David Goodger. Closes patch 101085.
* deletes cache
* adds firstweekday and setfirstweekday functions that allow user to control
which day of the week is first when displaying calendars
* adds month, week, calendar functions that return their results instead of
printing them
* adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the
ordinal values of the weekdays
Barry Warsaw [Wed, 30 Aug 2000 03:29:58 +0000 (03:29 +0000)]
Finalize this module for Python 2.0 based on feedback and input from
Martin von Loewis, Peter Funk, James Henstridge, Francois Pinard, and
Marc-Andre Lemburg.
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.