Andrew M. Kuchling [Tue, 11 Jul 2000 10:38:24 +0000 (10:38 +0000)]
Docstring changes.
Marc-André Lemburg [Tue, 11 Jul 2000 09:47:04 +0000 (09:47 +0000)]
Jeremy Hylton:
better error message for unicode coercion failure
Barry Warsaw [Tue, 11 Jul 2000 04:58:12 +0000 (04:58 +0000)]
string_join(): Some cleaning up of reference counting. In the
seqlen==1 clause, before returning item, we need to DECREF seq. In
the res=PyString... failure clause, we need to goto finally to also
decref seq (and the DECREF of res in finally is changed to a
XDECREF). Also, we need to DECREF seq just before the
PyUnicode_Join() return.
Jeremy Hylton [Tue, 11 Jul 2000 03:31:55 +0000 (03:31 +0000)]
add more tests of string.join variants to run_method_tests
Jeremy Hylton [Tue, 11 Jul 2000 03:28:17 +0000 (03:28 +0000)]
fix two refcount bugs in new string_join implementation:
1. PySequence_Fast_GET_ITEM is a macro and borrows a reference
2. The seq returned from PySequence_Fast must be decref'd
Tim Peters [Mon, 10 Jul 2000 22:41:30 +0000 (22:41 +0000)]
Now that prototypes are in scope, the compiler gives legit wngs
about int size mismatches at two calls to s_rand. Stuffed in
casts to make the code do what it did before but w/o warnings --
although unclear that's correct!
Jeremy Hylton [Mon, 10 Jul 2000 21:30:28 +0000 (21:30 +0000)]
two changes to string_join:
implementation -- use PySequence_Fast interface to iterate over elements
interface -- if instance object reports wrong length, ignore it;
previous version raised an IndexError if reported length was too high
Fredrik Lundh [Mon, 10 Jul 2000 19:32:19 +0000 (19:32 +0000)]
-- removed get_default compatibility kludge
-- added a few extra comments to locale.py
Fredrik Lundh [Mon, 10 Jul 2000 18:27:47 +0000 (18:27 +0000)]
- changed hash calculation for unicode strings. the new
value is calculated from the character values, in a way
that makes sure an 8-bit ASCII string and a unicode string
with the same contents get the same hash value.
(as a side effect, this also works for ISO Latin 1 strings).
for more details, see the python-dev discussion.
Eric S. Raymond [Mon, 10 Jul 2000 18:11:00 +0000 (18:11 +0000)]
Give ConfigParser the capability to set as well as read options, and to write
a representation of the configuration state in .ini format that can be read
back in by a future read() call. Thus this class is now a back end
for .ini editors as well as parsers.
This patch is complete and tested, but exposes a bug in the ConfigParser
implementation which I have not yet fixed. Because case information is
discarded during parsing, the output of write() has its case smashed.
I wrote this for a SourceForge interface script called forgetool.
Documentation for the new entry points included.
Peter Schneider-Kamp [Mon, 10 Jul 2000 17:25:37 +0000 (17:25 +0000)]
ANSI-fication (fixed on parameter list I messed up in the patch)
Peter Schneider-Kamp [Mon, 10 Jul 2000 17:15:07 +0000 (17:15 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 17:14:00 +0000 (17:14 +0000)]
ANSI-fication, added #ifdef construction in mpz_coerce
Jeremy Hylton [Mon, 10 Jul 2000 17:08:42 +0000 (17:08 +0000)]
factor out test definitions to string_tests module
test_string and test_userstring run same tests for string methods
Jeremy Hylton [Mon, 10 Jul 2000 17:07:17 +0000 (17:07 +0000)]
add isalpha and isalnum methods
Peter Schneider-Kamp [Mon, 10 Jul 2000 17:06:38 +0000 (17:06 +0000)]
ANSI-fication, not really tested, but should (hopefully) compile
Peter Schneider-Kamp [Mon, 10 Jul 2000 17:04:33 +0000 (17:04 +0000)]
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)
UNTESTED!
Fredrik Lundh [Mon, 10 Jul 2000 16:38:09 +0000 (16:38 +0000)]
- stupid typo.
Guido van Rossum [Mon, 10 Jul 2000 16:22:12 +0000 (16:22 +0000)]
Add linker flag -export-dynamic so symbols in libpython*.a are exported.
Fredrik Lundh [Mon, 10 Jul 2000 15:59:30 +0000 (15:59 +0000)]
-- get rid of a compiler warning on unix. (as reported
for #100836, but implemented in a different way)
Guido van Rossum [Mon, 10 Jul 2000 15:06:06 +0000 (15:06 +0000)]
Added the line 'Testing UTF-16 code point order comparisons... done."
to match addition to test_unicode.py.
Guido van Rossum [Mon, 10 Jul 2000 14:35:12 +0000 (14:35 +0000)]
Adapted for Python 2.0 under RH Linux.
Jeremy Hylton [Mon, 10 Jul 2000 14:28:25 +0000 (14:28 +0000)]
remove prints of file objects from _test
Jeremy Hylton [Mon, 10 Jul 2000 14:14:40 +0000 (14:14 +0000)]
expect message "no regression test case for method 'encode'
Andrew M. Kuchling [Mon, 10 Jul 2000 13:56:35 +0000 (13:56 +0000)]
Patch from Joe Eaton <jeaton@hostway.net> (SF#100741) to fix following problem:
There is a silly bug in the fall-back dumbdbm.py database package in
the Python 1.5.2 standard distro. This bug causes any changes to an
existing item to generate a new key, even when the key already
exists. After many updates, the .dir file used by dumbdbm grows to
a huge size, and can cause filesystem problems.
Peter Schneider-Kamp [Mon, 10 Jul 2000 13:12:27 +0000 (13:12 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 13:05:29 +0000 (13:05 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 12:43:58 +0000 (12:43 +0000)]
ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
Peter Schneider-Kamp [Mon, 10 Jul 2000 12:29:26 +0000 (12:29 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 12:15:54 +0000 (12:15 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 12:04:18 +0000 (12:04 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 11:56:03 +0000 (11:56 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 10:49:30 +0000 (10:49 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 10:03:58 +0000 (10:03 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 09:57:19 +0000 (09:57 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 09:55:32 +0000 (09:55 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 09:43:24 +0000 (09:43 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 09:31:34 +0000 (09:31 +0000)]
ANSI-fication
Peter Schneider-Kamp [Mon, 10 Jul 2000 09:26:41 +0000 (09:26 +0000)]
ANSI-fication (and test if committing files works now)
Sjoerd Mullender [Mon, 10 Jul 2000 08:09:48 +0000 (08:09 +0000)]
Better error handling of bad entity references. Before when an & in
an attribute value was not escaped, you could get two syntax errors:
one about a missing semicolon and one about an unknown entity. Now
you get only one about a bogus ampersand.
Vladimir Marangozov [Mon, 10 Jul 2000 05:37:39 +0000 (05:37 +0000)]
Initialize the return value in collect_generations() since it is updated
conditionally in the code.
Vladimir Marangozov [Mon, 10 Jul 2000 04:59:49 +0000 (04:59 +0000)]
Remove the "1" that Tim sticked to the preprocessor symbol for unknown reasons
(cf. the rest of the headers in the distribution)
Vladimir Marangozov [Mon, 10 Jul 2000 04:30:56 +0000 (04:30 +0000)]
A small comment fix just to make sure I got my cvs/ssh setup right.
Fred Drake [Mon, 10 Jul 2000 04:20:57 +0000 (04:20 +0000)]
Guido said include these in the Great ANSI-fication, so here they are!
Fredrik Lundh [Sun, 9 Jul 2000 23:35:24 +0000 (23:35 +0000)]
- changed the nt.popen2 return values back to
(write, read, ...), based on feedback from GvR.
- added tuple-swapping code to popen2.py
- fixed some runaway indentation in posixmodule.c
Fredrik Lundh [Sun, 9 Jul 2000 23:16:10 +0000 (23:16 +0000)]
- repaired locale.py for non-windows platforms. the try/except
checked for the wrong exception. my fault. sorry.
(first reported by Alex Coventry)
Barry Warsaw [Sun, 9 Jul 2000 22:27:10 +0000 (22:27 +0000)]
Exception__str__(): In case 1, be sure to decref the tmp local
variable. This crushes another memory leak. Slight rewrite
included.
Barry Warsaw [Sun, 9 Jul 2000 21:24:31 +0000 (21:24 +0000)]
Use TQSQ (triple quoted single quote) module docstring for better
font-locking. This complets the merge with Mailman's version.
Fredrik Lundh [Sun, 9 Jul 2000 20:42:34 +0000 (20:42 +0000)]
- changed 1.5 to 2.0 in the help text
(the PYTHONHOMEHELP define)
- ANSI-fication
(patch #100794 by Peter Schneider-Kamp)
Fredrik Lundh [Sun, 9 Jul 2000 20:35:15 +0000 (20:35 +0000)]
- ANSI-fication
(patch #100805 by Peter Schneider-Kamp)
Fred Drake [Sun, 9 Jul 2000 19:10:19 +0000 (19:10 +0000)]
Update to use the new standard webbrowser module if available, otherwise
uses the BrowserControl module.
BrowserControl is not removed to allow IDLE to be distributed separately
and still be used with Python 1.5.2.
Fredrik Lundh [Sun, 9 Jul 2000 17:59:32 +0000 (17:59 +0000)]
- added popen.popen2/popen3/popen4 support for
windows.
- added optional mode argument to popen2/popen3
for unix; if the second argument is an integer,
it's assumed to be the buffer size.
- changed nt.popen2/popen3/popen4 return values
to match the popen2 module (stdout first, not
stdin).
Fredrik Lundh [Sun, 9 Jul 2000 17:41:01 +0000 (17:41 +0000)]
- added optional bufsize argument to new popen methods.
for the moment, this argument must be left out or set
to -1 (only the default bufsize is supported, that is)
Fredrik Lundh [Sun, 9 Jul 2000 17:12:58 +0000 (17:12 +0000)]
- merged setlocale and set_locale. the internal setlocale
function is overridden by a python version which accepts
*either* a string (old behaviour) or a locale tuple.
- renamed a few methods (for consistency):
get_locale => getlocale
get_default_locale => getdefaultlocale
set_to_default => resetlocale (!)
- the _locale implementation module can now implement
an optional _getdefaultlocale function. if that function
isn't available, a POSIX-based approach is used (checking
LANG and other environment variables, as usual).
(patch #100765)
Fred Drake [Sun, 9 Jul 2000 16:45:56 +0000 (16:45 +0000)]
New module to control Web browsers; see the documentation for
more information.
Fred Drake [Sun, 9 Jul 2000 16:44:26 +0000 (16:44 +0000)]
Make tabnanny happy.
mailbox.py: Convert to 4-space indents.
Greg Stein [Sun, 9 Jul 2000 16:27:33 +0000 (16:27 +0000)]
needs a space
Fred Drake [Sun, 9 Jul 2000 15:48:49 +0000 (15:48 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 15:16:51 +0000 (15:16 +0000)]
ANSI-fication of the sources.
Fredrik Lundh [Sun, 9 Jul 2000 15:14:52 +0000 (15:14 +0000)]
- ANSI-fication
(patch #100784 by Peter Schneider-Kamp)
Fredrik Lundh [Sun, 9 Jul 2000 15:09:56 +0000 (15:09 +0000)]
- ANSI-ification
(patch #100770 by Peter Schneider-Kamp)
Andrew M. Kuchling [Sun, 9 Jul 2000 15:05:15 +0000 (15:05 +0000)]
Document addition of webbrowser.py
Mention the ANSIfication of the source.
Fredrik Lundh [Sun, 9 Jul 2000 14:49:51 +0000 (14:49 +0000)]
- improved os.popen support for windows, based on win32pipe
by Bill Tutt.
note: to run this on Windows 95/98, you need to have the
w9xpopen.exe helper in the same directory as the python DLL.
Fred Drake [Sun, 9 Jul 2000 14:39:29 +0000 (14:39 +0000)]
Remove setup of HAVE_OLD_CPP; it is no longer used in the Python sources.
The actual test for it is only commented out in configure.in, so it can
be re-enabled if we ever run across the need for it again.
Fred Drake [Sun, 9 Jul 2000 14:36:13 +0000 (14:36 +0000)]
Remove use of HAVE_OLD_CPP to support non-ANSI preprocessors.
Andrew M. Kuchling [Sun, 9 Jul 2000 14:35:00 +0000 (14:35 +0000)]
Patch from Peter Schneider-Kamp: convert curses module to ANSI prototypes,
and substitute the conventional "args" instead of "arg".
Fred Drake [Sun, 9 Jul 2000 14:22:08 +0000 (14:22 +0000)]
Remove legacy use of __SC__; no longer needed now that ANSI source is
the standard for Python implementation.
Fredrik Lundh [Sun, 9 Jul 2000 13:16:13 +0000 (13:16 +0000)]
- added (long) casts to a couple of Py_BuildValue calls,
just for the sake of it.
note that this only covers the unlikely case that size_t
is smaller than a long; it's probably more likely that
there are platforms out there where size_t is *larger*
than a long, and mmapmodule cannot really deal with that
today.
Fredrik Lundh [Sun, 9 Jul 2000 13:10:40 +0000 (13:10 +0000)]
- fixed pointer size test in spawn functions. also added
cast to make sure Py_BuildValue gets the right thing.
this change eliminates bogus return codes from successful
spawn calls (e.g.
2167387144924954624 instead of 0).
Fredrik Lundh [Sun, 9 Jul 2000 11:35:36 +0000 (11:35 +0000)]
- win95/98 helper for new os.popen code
this should be built as a console application (link with
USER32.LIB), and installed in the same directory as the
Python DLL.
Tim Peters [Sun, 9 Jul 2000 08:02:21 +0000 (08:02 +0000)]
Somebody started playing with const, so of course the outcome
was cascades of warnings about mismatching const decls. Overall,
I think const creates lots of headaches and solves almost
nothing. Added enough consts to shut up the warnings, but
this did require casting away const in one spot too (another
usual outcome of starting down this path): the function
mymemreplace can't return const char*, but sometimes wants to
return its first argument as-is, which latter must be declared
const char* in order to avoid const warnings at mymemreplace's
call sites. So, in the case the function wants to return the
first arg, that arg's declared constness must be subverted.
Fred Drake [Sun, 9 Jul 2000 07:04:36 +0000 (07:04 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 06:21:27 +0000 (06:21 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 06:03:25 +0000 (06:03 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 05:40:56 +0000 (05:40 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 05:31:24 +0000 (05:31 +0000)]
Remove legacy use of __SC__; no longer needed now that ANSI source is
the standard for Python implementation.
Fred Drake [Sun, 9 Jul 2000 05:02:18 +0000 (05:02 +0000)]
ANSI-fication of the sources.
Barry Warsaw [Sun, 9 Jul 2000 04:56:25 +0000 (04:56 +0000)]
EnvironmentError__init__(): The two case clauses were missing
`break's. This first missing break caused a memory leak when case 3
fell through case 2 in the following example:
import os
os.chmod('/missing', 0600)
Fred Drake [Sun, 9 Jul 2000 04:36:04 +0000 (04:36 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 04:34:13 +0000 (04:34 +0000)]
type_error(): Added "const" to signature to eliminate warning with -Wall.
Fred Drake [Sun, 9 Jul 2000 04:14:42 +0000 (04:14 +0000)]
ANSI-fication of the source.
Make the indentation and brace placement internally consistent.
Fred Drake [Sun, 9 Jul 2000 04:06:11 +0000 (04:06 +0000)]
ANSI-fication of the sources.
Fred Drake [Sun, 9 Jul 2000 03:35:10 +0000 (03:35 +0000)]
Remove the only Py_PROTO in the docs.
Tim Peters [Sun, 9 Jul 2000 03:09:57 +0000 (03:09 +0000)]
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
Tim Peters [Sun, 9 Jul 2000 02:11:18 +0000 (02:11 +0000)]
Get rid of unused vars in builtin_unicode (they were causing
legit warnings).
Fred Drake [Sun, 9 Jul 2000 00:55:06 +0000 (00:55 +0000)]
ANSI-fication and Py_PROTO extermination.
Fred Drake [Sun, 9 Jul 2000 00:20:36 +0000 (00:20 +0000)]
ANSI-fication and Py_PROTO extermination.
Fred Drake [Sat, 8 Jul 2000 23:37:28 +0000 (23:37 +0000)]
ANSI-fication and Py_PROTO extermination.
Fredrik Lundh [Sat, 8 Jul 2000 22:48:53 +0000 (22:48 +0000)]
this one's a bit risky, but I've spent some considerable time
staring at the diffs before checking this one in. let me know
asap if it breaks things on your platform.
-- ANSI-fying
(patch #100763 by Peter Schneider-Kamp, minus the
indentation changes and minus the changes the broke
the windows build)
Fredrik Lundh [Sat, 8 Jul 2000 22:05:01 +0000 (22:05 +0000)]
-- ANSI-fying, names
(patch #100762 by Peter Schneider-Kamp, minus the
indentation changes)
-- added INT_PTR workaround to make it build under VC 5.0
Fredrik Lundh [Sat, 8 Jul 2000 20:49:58 +0000 (20:49 +0000)]
- removed barry's workaround, to make room for
bill's more complete solution.
Fredrik Lundh [Sat, 8 Jul 2000 20:07:24 +0000 (20:07 +0000)]
- _getdefaultlocale shouldn't accept arguments
- some more spacification...
Fredrik Lundh [Sat, 8 Jul 2000 19:57:37 +0000 (19:57 +0000)]
- added _getdefaultlocale implementation for WIN32
- ansified, reindentified, spacified, nullified
Fredrik Lundh [Sat, 8 Jul 2000 18:06:41 +0000 (18:06 +0000)]
- this is a tentative checkin of the #100764 patch (by
Barry Scott). it appears to solve the problem on NT
and 2000, but not on Windows 95.
in other words, it's better than before, but not per-
fect. I'll leave the patch open for now.
Fredrik Lundh [Sat, 8 Jul 2000 17:43:32 +0000 (17:43 +0000)]
- changed __repr__ to use "unicode escape" encoding for unicode
strings, instead of the default encoding.
(see "minidom" thread for discussion, and also patch #100706)
Fred Drake [Sat, 8 Jul 2000 17:25:55 +0000 (17:25 +0000)]
ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake [Sat, 8 Jul 2000 16:59:03 +0000 (16:59 +0000)]
Minor revisions similar to some information in the new docstrings.
Fred Drake [Sat, 8 Jul 2000 16:56:26 +0000 (16:56 +0000)]
ANSI-fication of the sources, convert to 4-space indents.
Use PyArg_ParseTuple() to get better error messages.
Add docstrings all around.
Skip Montanaro [Sat, 8 Jul 2000 12:06:36 +0000 (12:06 +0000)]
delete unused local variable from _PyTrash_deposit_object
Andrew M. Kuchling [Sat, 8 Jul 2000 12:06:31 +0000 (12:06 +0000)]
Rearrange order of sections
Fix some incorrect module names