Barry Warsaw [Mon, 6 Nov 2000 18:46:09 +0000 (18:46 +0000)]
This fixes several bug reports concering memory bloating during large
file uploads.
In response to SF bugs 110674 and 119806, and discussions on
python-dev, we are removing the self.lines attribute from the
FieldStorage class. Specifically touched where methods __init__(),
read_lines_to_eof(), and skip_lines().
No one can remember why self.lines was added. Technically, it's part
of the public interface for the class, but it was never documented.
It's possible clever or nosy code will break because of this, but it
was decided to remove it and see who complains.
This resolution also closes the second half of the cgi.py entry in PEP
42. The first half of that PEP concerns specifically binary file
uploads, where there may be no end-of-line marker for a very long
time. This patch does not address that issue.
Jeremy Hylton [Mon, 6 Nov 2000 03:43:11 +0000 (03:43 +0000)]
Change the graph structure to contain the code generator object for
embedded code objects (e.g. functions) rather than the generated code
object. This change means that the compiler generates code for
everything at the end, rather then generating code for each function
as it finds it. Implementation note: _convert_LOAD_CONST in
pyassem.py must be change to call getCode().
Other changes follow. Several changes creates extra edges between
basic blocks to reflect control flow for loops and exceptions. These
missing edges had gone unnoticed because they do not affect the
current compilation process.
pyassem.py:
Add _enable_debug() and _disable_debug() methods that print
instructions and blocks to stdout as they are generated.
Add edges between blocks for instructions like SETUP_LOOP,
FOR_LOOP, etc.
Add pruneNext to get rid of bogus edges remaining after
unconditional transfer ops (e.g. JUMP_FORWARD)
Change repr of Block to omit block length.
pycodegen.py:
Make sure a new block is started after FOR_LOOP, etc.
Change assert implementation to use RAISE_VARARGS 1 when there is
no user-specified failure output.
Fredrik Lundh [Fri, 3 Nov 2000 20:24:15 +0000 (20:24 +0000)]
Added 38,642 missing characters to the Unicode database (first-last
ranges) -- but thanks to the 2.0 compression scheme, this doesn't add
a single byte to the resulting binaries (!)
Thomas Wouters [Fri, 3 Nov 2000 08:18:37 +0000 (08:18 +0000)]
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
regardless of whether the system getopt() does what we want. This avoids the
hassle with prototypes and externs, and the check to see if the system
getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to
avoid name clashes. Add new include file to define the right symbols. Fix
Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on
Python to provide it.
Patch from Randall Hopper to fix PR #116172, "curses module fails to
build on SGI":
* Check for 'sgi' preprocessor symbol, not '__sgi__'
* Surround individual character macros with #ifdef's, instead of making them
all rely on STRICT_SYSV_CURSES
Guido van Rossum [Mon, 30 Oct 2000 17:45:07 +0000 (17:45 +0000)]
Hack to force -lpthread instead instead of -lcma on HPUX, by Philipp
Jocham. Philipp asks: "Are there any success stories with HP-UX 11.00
and -lcma? Maybe libcma is broken."
Fred Drake [Mon, 30 Oct 2000 06:24:56 +0000 (06:24 +0000)]
define_module(): Change the "index sub-item" for definitions at module
scope to be " (in module <name>)" instead of
" (in <name>)" to be consistent with \withsubitem
usage throughout the documentation. This achieves
consistency in indexing throughout the documentation.
Fred Drake [Mon, 30 Oct 2000 06:22:22 +0000 (06:22 +0000)]
Fix \withsubitem so that it actually works if the only indexing macro in
the content body is the \ttindex macro, which seems to match actual usage.
Adjust \funcline to restore the "index sub-item" for functions to be
" (in module <name>)" instead of " (in <name>)". This is need to match
uses of \withsubitem throughout the documentation. (Not ideal, but
gets achieves consistency.)
Fred Drake [Sun, 29 Oct 2000 05:19:16 +0000 (05:19 +0000)]
Avoid using \withsubitem and \ttindex internally; they have not proven
to be very robust. Using \index directly fixes a lot of entries in the
index that had to be specifically read to determine that they had the
wrong parenthesized description.
Barry Warsaw [Fri, 27 Oct 2000 05:00:25 +0000 (05:00 +0000)]
(py-goto-beginning-of-tqs): When searching backwards for the matching
delimiter, watch out for backslash escaped delimiters. Also use =
instead of eq for character comparison (because a character is = to
it's integer value, but not eq to it).
Fred Drake [Thu, 26 Oct 2000 19:26:47 +0000 (19:26 +0000)]
Update the dependency information to allow the other Makefiles to handle
as much of this as possible. Avoids propogating information about how
various outputs relate (or don't!).
Fred Drake [Thu, 26 Oct 2000 17:13:19 +0000 (17:13 +0000)]
Update build instructions to reflect the rename from Setup.in to Setup.dist.
Clarify when this file is created automatically and do not advocate
creating it unless needed.
Fred Drake [Wed, 25 Oct 2000 21:05:29 +0000 (21:05 +0000)]
Since LookupError can be raised by sys.setdefaultencoding(), we should not
document it as only being a base class, not matter how unlikely this is
to affect normal users.
Jeremy Hylton [Wed, 25 Oct 2000 18:10:32 +0000 (18:10 +0000)]
Many changes.
Reformatting -- long lines, "[ ]" -> "[]", a few indentation nits.
Replace calls to Node function (which constructed ast nodes) with
calls to actual constructors imported from ast module.
Optimize com_node (most frequently used method) for the common case --
the appropriate method is found in _dispatch.
Fix com_augassign to use class object's rather than node names
(rendered invalid by recent changes to ast)
Remove expensive tests for sequence-ness in com_stmt and
com_append_stmt. These tests should never fail; if they do, something
is really broken and exception will be raised elsewhere.
Fix com_stmt and com_append_stmt to use isinstance rather than
testing's type slot of ast node (this slot disappeared with recent
changes to ast).
Jeremy Hylton [Wed, 25 Oct 2000 18:02:02 +0000 (18:02 +0000)]
Small optimizations in dispatch method: 1) lookup node's __class__ once
and store in local; 2) define _preorder to be dispatch (rather than
method that called dispatch).
Fred Drake [Wed, 25 Oct 2000 16:18:10 +0000 (16:18 +0000)]
Rename $PYTHON_VERSION to $PACKAGE_VERSION; this is the version number for
whatever is being documented, not necessarily Python. (These tools are
also used for the How-To documents, etc.)
get_version_text(): New function. Returns HTML fragment describing the
software version and documentation date.
bot_navigation_panel(): Include the result of get_version_text() at the
end, so the information is available on every page.
Fred Drake [Wed, 25 Oct 2000 16:15:13 +0000 (16:15 +0000)]
Rename $PYTHON_VERSION to $PACKAGE_VERSION; this is the version number for
whatever is being documented, not necessarily Python. (These tools are
also used for the How-To documents, etc.)
Fred Drake [Tue, 24 Oct 2000 02:34:45 +0000 (02:34 +0000)]
Paul Prescod <paul@prescod.net>:
Documentation for the xml.dom.minidom module & Python DOM API.
FLD: I have revised the markup in some places and added a few minor
details to Paul's text, but that's it. Given the substantial
structural differences with the bulk of the presentation, I will be
making additional revisions over the next few days.
Fred Drake [Mon, 23 Oct 2000 16:00:54 +0000 (16:00 +0000)]
Added exception to the rule that the buffer returned by PyString_AsString()
and PyString_AsStringAndSize() for strings that were just created using
PyString_FromStringAndSize(NULL, n).
This closes bug #117377.
Added warning about passing NULL to the concrete object functions; many of
them use the appropriate Py<Type>_Check() test, but do not check for NULL.