Commit graph

13541 commits

Author SHA1 Message Date
Fred Drake
7399b9e6e4 Moshe Zadka <mzadka@geocities.com>:
Update the "in" / "not in" description to accomodate the current use
of the __contains__() discipline.  This patch also incorporates
suggestions from Marc-Andre Lemburg <mal@lemburg.com>, minor markup
revisions from Fred Drake, and some rewording of the first affected
paragraph (also from Fred).

Closes SourceForge patch #100831.
2000-07-11 19:43:47 +00:00
Fred Drake
85f363990c Create two new exceptions: IndentationError and TabError. These are
used for indentation related errors.  This patch includes Ping's
improvements for indentation-related error messages.

Closes SourceForge patches #100734 and #100856.
2000-07-11 17:53:00 +00:00
Peter Schneider-Kamp
88e1932930 fixed a warning in getsockaddrlen 2000-07-11 17:40:30 +00:00
Peter Schneider-Kamp
7f589fddad add expandtabs command (-e)
change eliminate to delete (-d)
2000-07-11 16:43:16 +00:00
Fred Drake
acab3d61e9 Change the table in the pyexpat.errors module to a series of datadesc
elements (since the table was pretty screwed up); this is how it is done
elsewhere in the manual.

I could use some help creating descriptions of the specific error
identifiers (input conditions that lead to each error, etc.).
2000-07-11 16:30:30 +00:00
Jeremy Hylton
fff9e20943 fix bug #42 reported by Andrew Dalke
The Compare close contains a close method that checks to see if there
is any unconsumed data in the Compare instance; i.e. if the canonical
output file contains more data than was produced by the current test
run. This method was never called, allowing differences to go
undetected.

Fix is to call close after the test is run (after __import__)

output/test_long and output/test_popen2 needed trivial changes
output/test_select contained lots of text, but test_select.py produced
    no output
2000-07-11 15:15:31 +00:00
Fred Drake
b35de5b78a Neil Schemenauer <nascheme@enme.ucalgary.ca>:
Change a cast, intialize a local, and make some sprintf() format strings
type-appropriate (add the "l" to "%d").

Closes SourceForge patch #100737.
2000-07-11 14:37:41 +00:00
Eric S. Raymond
5f1b27084a Bug fix: ? and ! were not full aliases for help' and shell' as implied in
the documentation; the cases `? foo' and `! foo' failed.
2000-07-11 13:03:55 +00:00
Peter Schneider-Kamp
7a11671e8b fixed inconsistent use of tab and spaces 2000-07-11 11:24:41 +00:00
Andrew M. Kuchling
d3cf692c38 Add test of resize() method of mmap objects 2000-07-11 10:45:28 +00:00
Andrew M. Kuchling
e0d0090e76 Docstring changes. 2000-07-11 10:38:24 +00:00
Marc-André Lemburg
566d8a64eb Jeremy Hylton:
better error message for unicode coercion failure
2000-07-11 09:47:04 +00:00
Barry Warsaw
771d0675b6 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.
2000-07-11 04:58:12 +00:00
Jeremy Hylton
20f41b6456 add more tests of string.join variants to run_method_tests 2000-07-11 03:31:55 +00:00
Jeremy Hylton
4904829dbf 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
2000-07-11 03:28:17 +00:00
Tim Peters
dc0c031ad8 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!
2000-07-10 22:41:30 +00:00
Jeremy Hylton
194e43e953 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
2000-07-10 21:30:28 +00:00
Fredrik Lundh
663809ed83 -- removed get_default compatibility kludge
-- added a few extra comments to locale.py
2000-07-10 19:32:19 +00:00
Fredrik Lundh
dde6164402 - 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.
2000-07-10 18:27:47 +00:00
Eric S. Raymond
417c489def 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.
2000-07-10 18:11:00 +00:00
Peter Schneider-Kamp
3e3175b5e7 ANSI-fication (fixed on parameter list I messed up in the patch) 2000-07-10 17:25:37 +00:00
Peter Schneider-Kamp
8bc8f0d036 ANSI-fication 2000-07-10 17:15:07 +00:00
Peter Schneider-Kamp
3646366f4c ANSI-fication, added #ifdef construction in mpz_coerce 2000-07-10 17:14:00 +00:00
Jeremy Hylton
f82b04ecbb factor out test definitions to string_tests module
test_string and test_userstring run same tests for string methods
2000-07-10 17:08:42 +00:00
Jeremy Hylton
fd54757336 add isalpha and isalnum methods 2000-07-10 17:07:17 +00:00
Peter Schneider-Kamp
cb27c35aa6 ANSI-fication, not really tested, but should (hopefully) compile 2000-07-10 17:06:38 +00:00
Peter Schneider-Kamp
6a85027a97 ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)

UNTESTED!
2000-07-10 17:04:33 +00:00
Fredrik Lundh
10723347c6 - stupid typo. 2000-07-10 16:38:09 +00:00
Guido van Rossum
c716684df8 Add linker flag -export-dynamic so symbols in libpython*.a are exported. 2000-07-10 16:22:12 +00:00
Fredrik Lundh
44328e60df -- get rid of a compiler warning on unix. (as reported
for #100836, but implemented in a different way)
2000-07-10 15:59:30 +00:00
Guido van Rossum
1bbddd085c Added the line 'Testing UTF-16 code point order comparisons... done."
to match addition to test_unicode.py.
2000-07-10 15:06:06 +00:00
Guido van Rossum
964f123346 Adapted for Python 2.0 under RH Linux. 2000-07-10 14:35:12 +00:00
Jeremy Hylton
fb8849c4a5 remove prints of file objects from _test 2000-07-10 14:28:25 +00:00
Jeremy Hylton
a5ae490584 expect message "no regression test case for method 'encode' 2000-07-10 14:14:40 +00:00
Andrew M. Kuchling
a48dbde93b 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.
2000-07-10 13:56:35 +00:00
Peter Schneider-Kamp
39e0e5a180 ANSI-fication 2000-07-10 13:12:27 +00:00
Peter Schneider-Kamp
7d0c71ac8c ANSI-fication 2000-07-10 13:05:29 +00:00
Peter Schneider-Kamp
286da3b46a ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
2000-07-10 12:43:58 +00:00
Peter Schneider-Kamp
41c36ffe83 ANSI-fication 2000-07-10 12:29:26 +00:00
Peter Schneider-Kamp
416d413527 ANSI-fication 2000-07-10 12:15:54 +00:00
Peter Schneider-Kamp
e89b15691e ANSI-fication 2000-07-10 12:04:18 +00:00
Peter Schneider-Kamp
c4bc0e0895 ANSI-fication 2000-07-10 11:56:03 +00:00
Peter Schneider-Kamp
0659b4af46 ANSI-fication 2000-07-10 10:49:30 +00:00
Peter Schneider-Kamp
3707efef9b ANSI-fication 2000-07-10 10:03:58 +00:00
Peter Schneider-Kamp
a788a7f0fb ANSI-fication 2000-07-10 09:57:19 +00:00
Peter Schneider-Kamp
fe74263cec ANSI-fication 2000-07-10 09:55:32 +00:00
Peter Schneider-Kamp
8235f1c834 ANSI-fication 2000-07-10 09:43:24 +00:00
Peter Schneider-Kamp
f1ca898d85 ANSI-fication 2000-07-10 09:31:34 +00:00
Peter Schneider-Kamp
faaad372ec ANSI-fication (and test if committing files works now) 2000-07-10 09:26:41 +00:00
Sjoerd Mullender
f985064781 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.
2000-07-10 08:09:48 +00:00