Tim Peters [Sun, 18 Feb 2001 04:45:10 +0000 (04:45 +0000)]
Bug #132313 error message confusing for assignment in lambda.
They're actually complaining about something more specific, an assignment
in a lambda as an actual argument, so that Python parses the
lambda as if it were a keyword argument. Like f(lambda x: x[0]=42).
The "lambda x: x[0]" part gets parsed as if it were a keyword, being
bound to 42, and the resulting error msg didn't make much sense.
Jack Jansen [Sat, 17 Feb 2001 23:31:48 +0000 (23:31 +0000)]
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Tim Peters [Sat, 17 Feb 2001 05:58:44 +0000 (05:58 +0000)]
SF patch #103808: doctest.py docs
Checking in Moshe's patch after rewrapping some paragraphs (to consume
fewer columns) and repairing that I/2.**J lost the I.
Set PYTHONPATH when running setup.py in order to override any ambient
value for it, as suggested in bug #129854. This prevents an old
PYTHONPATH confusing setup.py (say, if it results in Python finding
an old version of the Distutils)
Tim Peters [Sat, 17 Feb 2001 05:30:26 +0000 (05:30 +0000)]
Change temp names created by listcomps from [%d] to _[%d], so the one-liner
[k for k in dir() if k[0] != "_"]
can be used to get the non-private names (used to contain "[1]").
Jack Jansen [Fri, 16 Feb 2001 21:48:24 +0000 (21:48 +0000)]
Steven Majewski's instructions for building the toolbox modules for
incorporating them in a vanilla Python under MacOSX (i.e. in a
non-MacPython-Python). Not complete and up-to-date right now, but
that'll be fixed shortly.
Fred Drake [Fri, 16 Feb 2001 20:46:26 +0000 (20:46 +0000)]
Remove the old version of my_StartElementHandler(). This was conditionally
compiled only for some versions of Expat, but was no longer needed as the
new implementation works for all versions. Keeping it created multiple
definitions for Expat 1.2, which caused compilation to fail.
Neil Schemenauer [Fri, 16 Feb 2001 03:59:53 +0000 (03:59 +0000)]
Build grammar files in their proper place rather than moving them. This should
allow building with a read-only source tree (although I haven't tried it).
Skip Montanaro [Thu, 15 Feb 2001 22:15:14 +0000 (22:15 +0000)]
bunch more __all__ lists
also modified check_all function to suppress all warnings since they aren't
relevant to what this test is doing (allows quiet checking of regsub, for
instance)
Skip Montanaro [Thu, 15 Feb 2001 16:56:36 +0000 (16:56 +0000)]
provide simple recovery/escape from apparent redirect recursion. If the
number of entries into http_error_302 exceeds the value set for the maxtries
attribute (which defaults to 10), the recursion is exited by calling
the http_error_500 method (or if that is not defined, http_error_default).
Thomas Wouters [Thu, 15 Feb 2001 08:46:56 +0000 (08:46 +0000)]
Add a few more missing prototypes to the SunOS 4.1.4 section (no SF
bugreport, just an IRC one by Marion Delgado.) These prototypes are
necessary because the functions are tossed around, not just called.
Fred Drake [Wed, 14 Feb 2001 18:29:45 +0000 (18:29 +0000)]
xmlparseobject: Remove the unused conv_attrs field, added an
in_callback field that's set to true whenever a callback into an
event handler is true. Needed for:
set_error(): Add line number of offset information to the exception
as attributes, so users don't need to parse the text of the
message.
set_error_attr(): New helper function for set_error().
xmlparse_GetInputContext(): New function of the parser object;
returns the document source for an event during a callback, None
at all other times.
xmlparse_SetParamEntityParsing(): Make the signature consistent with
the other parser methods (use xmlparseobject* for self instead of
PyObject*).
initpyexpat(): Don't lose the reference to the exception class!
call_with_frame(),
getcode(): Re-indent to be consistent with the rest of the file.
Jack Jansen [Wed, 14 Feb 2001 17:06:32 +0000 (17:06 +0000)]
The new touched() was far too expensive. Re-enabled the old one, the ae-based one is available as touched_ae(). Have to read up on the subject of telling the finder about changes.
Fred Drake [Wed, 14 Feb 2001 15:24:17 +0000 (15:24 +0000)]
Be much more permissive in what we accept in section names; there has been
at least one addition to the set of accepted characters for every release
since this module was first added; this should take care of the problem
in a more substantial way.
Tim Peters [Wed, 14 Feb 2001 06:35:35 +0000 (06:35 +0000)]
Miranda newlines: if anything at all was written to stdout, supply a
newline at the end if there isn't one already. Expected output has no
way to indicate that a trailing newline was not expected, and in the
interpreter shell *Python* supplies the trailing newline before printing
the next prompt.
Finished the section on weak references
Mentioned doctest, difflib, sys._getframe(), and the change to use
PyImport_ImportModule() everywhere in C code
No more XXX!
Tim Peters [Mon, 12 Feb 2001 22:13:26 +0000 (22:13 +0000)]
Related to SF bug 132008 (PyList_Reverse blows up).
_testcapimodule.c
make sure PyList_Reverse doesn't blow up again
getargs.c
assert args isn't NULL at the top of vgetargs1 instead of
waiting for a NULL-pointer dereference at the end
Guido van Rossum [Mon, 12 Feb 2001 22:06:02 +0000 (22:06 +0000)]
Fix core dump whenever PyList_Reverse() was called.
This fixes SF bug #132008, reported by Warren J. Hack.
The copyright for this patch (and this patch only) belongs to CNRI, as
part of the (yet to be issued) 1.6.1 release.
This is now checked into the HEAD branch. Tim will check in a test
case to check for this specific bug, and an assertion in
PyArgs_ParseTuple() to catch similar bugs in the future.
Skip Montanaro [Mon, 12 Feb 2001 20:58:30 +0000 (20:58 +0000)]
The bulk of the credit for these changes goes to Bastian Kleineidam
* restores urllib as the file fetcher (closes bug #132000)
* allows checking URLs with empty paths (closes patches #103511 and 103721)
* properly handle user agents with versions (e.g., SpamMeister/1.5)
* added several more tests
Fred Drake [Mon, 12 Feb 2001 17:23:20 +0000 (17:23 +0000)]
Added options that use square brackets in their names; this ensures that
GNOME-style internationalized options can be parsed using ConfigParser
(SF bug #131635).
Converted the tests to use test_support.verify() instead of output
comparison to work.
Fred Drake [Mon, 12 Feb 2001 17:18:11 +0000 (17:18 +0000)]
Allow square brackets in the option names; this makes it possible to use
ConfigParser with GNOME-ish config files that use the internationalization
conventions found in GNOME.