Commit graph

9050 commits

Author SHA1 Message Date
Vinay Sajip
7dc8ec9091 Copyright year changed 2004-06-02 10:51:05 +00:00
Piers Lauder
0659452b8b Added IMAP4_stream to __all__ 2004-06-02 00:42:36 +00:00
Tim Peters
1f4bcf9edd test_hash(): The test here is different enough from the one in the bug
report that the stats for expected # of collisions are a little higher.
Updated comments accordingly.
2004-06-01 18:58:04 +00:00
Andrew M. Kuchling
09e2cb0ba7 [Bug #962631] Fix typo reported by Bryan Blackburn 2004-06-01 12:48:19 +00:00
Raymond Hettinger
41bd02256f SF bug #942952: Weakness in tuple hash
(Basic approach and test concept by Tim Peters.)

* Improved the hash to reduce collisions.
* Added the torture test to the test suite.
2004-06-01 06:36:24 +00:00
Martin v. Löwis
504239fb38 Silence noise in regrtest. 2004-06-01 04:36:51 +00:00
Tim Peters
2f50e90818 SF patch 959726: sdist versus SVN
The disutils sdist command now ignores .svn directories.
2004-05-31 19:27:59 +00:00
Martin v. Löwis
92816de18e Patch #932930: suggest the use of rawstrings for backslashes. 2004-05-31 19:01:00 +00:00
Martin v. Löwis
2a6ba9097e Patch #963318: Add support for client-side cookie management. 2004-05-31 18:22:40 +00:00
Walter Dörwald
0a6d0ff8d9 Port the dictionary tests from test_types.py to unittest. Collect as much
mapping tests as possible in mapping_test.py and reuse the tests in
test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py.
From SF patch #736962.
2004-05-31 16:29:04 +00:00
Walter Dörwald
cbd0b365c1 Fix typo (from SF bug #962602) 2004-05-31 15:12:27 +00:00
Raymond Hettinger
027bb633b6 Add weakref support to sockets and re pattern objects. 2004-05-31 03:09:25 +00:00
Raymond Hettinger
cb87bc8e7e Add weakref support to array.array and file objects. 2004-05-31 00:35:52 +00:00
Raymond Hettinger
691d80532b Make sets and deques weak referencable. 2004-05-30 07:26:47 +00:00
Walter Dörwald
80ce6dd564 The default argument in dict.setdefault() defaults to None.
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
2004-05-27 18:16:25 +00:00
Walter Dörwald
c139909611 The default argument in dict.setdefault() defaults to None.
Add this default to UserDict.DictMixin.setdefault() too.
2004-05-27 09:41:04 +00:00
Raymond Hettinger
ddc819c964 Make sure sets are printed in sorted order 2004-05-22 19:37:21 +00:00
Raymond Hettinger
1453e4aa75 * teach repr.repr() about collections.deque()
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger
ba6cd3647f * Updated repr.py to handle set() and frozenset().
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Raymond Hettinger
83ee79524a Add a test to verify an early call to iter() on the outermost for
expression.
2004-05-20 23:04:13 +00:00
Piers Lauder
c1e32b6518 Fixed IMAP4_SSL read bug introduced by patch 956394 2004-05-20 11:32:35 +00:00
Piers Lauder
8f2b24401e Fixed IMAP4_SSL read and readlines code per patch 956394 2004-05-20 01:16:14 +00:00
Armin Rigo
ba91b9fdda Applying SF patch #949329 on behalf of Raymond Hettinger. 2004-05-19 19:10:18 +00:00
Raymond Hettinger
354433a59d SF patch #872326: Generator expression implementation
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Fred Drake
82903148a8 ConfigParser:
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651)
2004-05-18 04:24:02 +00:00
Fred Drake
abc086fb0d ConfigParser:
- don't allow setting options to non-string values; raise TypeError
  when the value is set, instead of raising an arbitrary exception
  later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843)
2004-05-18 03:29:52 +00:00
Fred Drake
bc12b01d83 ConfigParser:
- ensure that option names in interpolations are handled by
  self.optionxform in the same way that other references to option
  names
- add tests, documentation
(closes SF bug #857881, patch #865455)
2004-05-18 02:25:51 +00:00
Tim Peters
ad9a7c4489 test_alias_nofallback(): Someone broke this test, after 2.3, by
converting it into assertRaises() form.  Restored the 2.3 code, and
explained why assertRaises() cannot be used instead.
2004-05-16 05:36:30 +00:00
Barry Warsaw
e4aeb7d1f1 _parsegen(): Add a missing check for NeedMoreData. 2004-05-15 16:26:28 +00:00
Skip Montanaro
2dc0c13840 typo - fixes 954030. 2004-05-14 16:31:56 +00:00
Barry Warsaw
ac606ccb79 forward porting from release23-maint 2004-05-13 23:18:54 +00:00
Barry Warsaw
2178a6d1a2 test_boundary_in_non_multipart(): Added a test for SF bug # 846938. 2004-05-13 23:17:04 +00:00
Barry Warsaw
61e5616d74 encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but
still 7-bit.
2004-05-13 22:50:12 +00:00
Barry Warsaw
4e59bc1e67 readline(): RFC 2046, section 5.1.2 (and partially 5.1) both state that the
parser must recognize outer boundaries in inner parts.  So cruise through the
EOF stack backwards testing each predicate against the current line.

There's still some discussion about whether this is (always) the best thing to
do.  Anthony would rather parse these messages as if the outer boundaries were
ignored.  I think that's counter to the RFC, but might be practically more
useful.  Can you say behavior flag?  (ug).
2004-05-13 20:17:51 +00:00
Barry Warsaw
58eb0fcb8f test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():
Two evil samples from Anthony's MIME torture tests.
2004-05-13 20:15:20 +00:00
Barry Warsaw
d49f1d6c5a _structure(): Make sure all output goes the to fp object. 2004-05-13 20:14:20 +00:00
Barry Warsaw
d0c12af7ef Another evil test from Anthony's suite. This one has an inner part with the
same boundary as the outer part.
2004-05-13 20:13:48 +00:00
Barry Warsaw
dce231fb14 A boiled down example from Anthony's MIME torture tests. This one has a
separating boundary for an outer part inside an inner part.
2004-05-13 20:12:32 +00:00
Greg Ward
f0ba764dbb SF #847346: merge from release23-maint branch: remove misguided
optimization for short input; beef up tests for fix_sentence_endings
feature.
2004-05-13 01:53:10 +00:00
Raymond Hettinger
0e371f2cb6 Make sure "del d[n]" is properly supported. Was necessary because the
same method that implements __setitem__ also implements __delitem__.
Also, there were several good use cases (removing items from a queue
and implementing Forth style stack ops).
2004-05-12 20:55:56 +00:00
Fred Drake
1cd6e4dc38 fix various descriptions of "ctime"
(closes SF patch #870287)
2004-05-12 03:51:40 +00:00
Barry Warsaw
486cb0ac2a Tests for message/external-body and for duplicate boundary lines. 2004-05-11 22:23:59 +00:00
Barry Warsaw
b067e6287b More boiled down tests from Anthony's big torture suite. 2004-05-11 22:21:56 +00:00
Barry Warsaw
769f14a7c9 A boiled down message/external-body example from Anthony's torture test. 2004-05-11 22:20:59 +00:00
Barry Warsaw
bce827bf12 An example with multiple boundary lines. 2004-05-11 22:20:05 +00:00
Barry Warsaw
d38f448865 _parsegen(): Move the message/rfc822 clause to after the
message/delivery-status clause, and genericize it to handle all (other)
message/* content types.  This lets us correctly parse 2 more of Anthony's
MIME torture tests (specifically, the message/external-body examples).
2004-05-11 20:19:09 +00:00
Tim Peters
c312b07d77 Reverting local change checked in by mistake. 2004-05-11 18:18:35 +00:00
Tim Peters
926bc22c65 Added 2.3.3 and 2.3.4 to the release table. Added 2004 to the list of
copyright years.
2004-05-11 18:13:10 +00:00
Barry Warsaw
5b44cd64d7 _parsegen(): Watch out for empty epilogues. 2004-05-11 18:10:15 +00:00
Thomas Heller
2e7c8328ae Fix SF item #876278: Unbounded recursion in modulefinder.
Already backported to release23-maint.
2004-05-11 15:10:59 +00:00