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.
Jack Jansen [Mon, 12 Feb 2001 14:52:47 +0000 (14:52 +0000)]
The interpreters built are now called PythonInterpreterClassic and PythonInterpreterCarbon. The fullbuild script takes care of copying either of these to PythonInterpreter.
Tim Peters [Mon, 12 Feb 2001 03:27:31 +0000 (03:27 +0000)]
test_pty started failing on Windows, but if and only if test___all__ was
run first. Indirectly due to Skip adding check_all("pty") to test___all__:
that caused the expected ImportError due to pty.py trying to import the
non-existent FCNTL to get handled by test___all__, leaving a partial
module object for pty in sys.modules, which caused the later import of
pty via test_pty to succeed. Then test_tpy died with an AttributeError,
due to trying to access attributes of pty that didn't exist. regrtest
viewed that as a failure rather than the appropriate "test skipped".
Fixed by deleting partial module objects in test___all__ when test___all__
handles an ImportError.
Tim Peters [Sun, 11 Feb 2001 04:35:39 +0000 (04:35 +0000)]
Ugly fix for SF bug 131239 (-x flag busted).
Bug was introduced by tricks played to make .pyc files executable
via cmdline arg. Then again, -x worked via a trick to begin with.
If anyone can think of a portable way to test -x, be my guest!
Jack Jansen [Sun, 11 Feb 2001 01:26:28 +0000 (01:26 +0000)]
Bit the bullet and added a private GUSISIOUX for Python. This makes the delayconsole and keepopen code neater. Also tells Sioux to behave better with events, and handles cmd-. during print better. The pythonpreferences have also changed due to this.
Jack Jansen [Sun, 11 Feb 2001 01:08:04 +0000 (01:08 +0000)]
Bit the bullet and added a private GUSISIOUX for Python. This makes the delayconsole and keepopen code neater. Also tells Sioux to behave better with events, and handles cmd-. during print better. The pythonpreferences have also changed due to this.
Tim Peters [Sat, 10 Feb 2001 08:00:53 +0000 (08:00 +0000)]
Moved SequenceMatcher from ndiff into new std library module difflib.py.
Guido told me to do this <wink>.
Greatly expanded docstrings, and fleshed out with examples.
New std test.
Added new get_close_matches() function for ESR.
Needs docs, but LaTeXification of the module docstring is all it needs.
\CVS: ----------------------------------------------------------------------
Jeremy Hylton [Fri, 9 Feb 2001 22:22:18 +0000 (22:22 +0000)]
Relax the rules for using 'from ... import *' and exec in the presence
of nested functions. Either is allowed in a function if it contains
no defs or lambdas or the defs and lambdas it contains have no free
variables. If a function is itself nested and has free variables,
either is illegal.
Revise the symtable to use a PySymtableEntryObject, which holds all
the revelent information for a scope, rather than using a bunch of
st_cur_XXX pointers in the symtable struct. The changes simplify the
internal management of the current symtable scope and of the stack.
Added new C source file: Python/symtable.c. (Does the Windows build
process need to be updated?)
As part of these changes, the initial _symtable module interface
introduced in 2.1a2 is replaced. A dictionary of
PySymtableEntryObjects are returned.
This modified version of a patch by Thomas Heller allows __import__
hooks to take over the Python import machinery at a very early stage
in the Python startup phase.
If there are still places in the Python interpreter which need to
bypass the __import__ hook, these places must now use
PyImport_ImportModuleEx() instead. So far no other places than in
the import mechanism itself have been identified.
Jack Jansen [Fri, 9 Feb 2001 15:58:34 +0000 (15:58 +0000)]
Replaced touched(), which no longer seems to work under os9, with something using an appleevent to the finder. More expensive, but at least it works:-)
Eric S. Raymond [Fri, 9 Feb 2001 12:10:26 +0000 (12:10 +0000)]
Eliminate use of string.whitespace and a string import with it.
Some of the characters (form feed, vertical tab) are not
legal continuation characters anyway, so this was wrong as
well as annoying.