Commit graph

7886 commits

Author SHA1 Message Date
Thomas Wouters
9e1c192525 binascii_a2b_base64: Properly return an empty string if the input was all
invalid, rather than returning a string of random garbage of the
    estimated result length. Closes SF patch #703471 by Hye-Shik Chang.

Will backport to 2.2-maint (consider it done.)
2003-03-17 11:24:29 +00:00
Jack Jansen
450bd873ac Capturing the exit status for the build process didn't work. Using
popen2.Popen4() makes it work. Fixes #702180.
2003-03-17 10:54:41 +00:00
Guido van Rossum
0070f007f4 Change the default number of repetitions to 3, both in the Timer class
(from 10) and in main() (from 1).

Add a -v option that shows the raw times.  Repeating it cranks up the
display precision.

Always use the "best of N" form of output.
2003-03-15 12:25:00 +00:00
Guido van Rossum
d2b738ee7d If time.tzset doesn't exist, don't test it. 2003-03-15 12:01:52 +00:00
Guido van Rossum
d11b62edd0 - New function time.tzset() provides access to the C library tzet()
function, if supported.  (SF patch #675422, by Stuart Bishop.)
2003-03-14 21:51:36 +00:00
Guido van Rossum
538f1d842c Implement some recommendations from Raymond H:
- Make all local variables in the template start with an underscore,
  to prevent name conflicts with the timed code.

- Added a method to print a traceback that shows source lines from the
  expanded template.

- Use that method in main().
2003-03-14 17:21:00 +00:00
Fred Drake
0834d77bc4 Accept commas in unquoted attribute values.
This closes SF patch #669683.
2003-03-14 16:21:57 +00:00
Michael W. Hudson
43ed43bfc1 Take out my (long since disabled) POSIX signal mask handling code.
I'm not going to have the time or energy to get this working x-platform
-- anyone who does is welcome to the code!
2003-03-13 13:56:53 +00:00
Kurt B. Kaiser
94afd3095e Move setting of ioready 'wait' earlier in call chain, to
rpc.SocketIO.main() and asyncreturn().  Improve comment.
2003-03-12 20:52:00 +00:00
Jack Jansen
b1fbf855a3 Filter out the depracation warning for macfs. 2003-03-12 13:47:39 +00:00
Raymond Hettinger
83245b5828 SF bug #699934: Obscure error message
Clarify error message for mro conflicts.
2003-03-12 04:25:42 +00:00
Barry Warsaw
ea8f6fa094 test_whitespace_eater_unicode(): Make this test Python 2.1 compatible. 2003-03-12 03:14:11 +00:00
Barry Warsaw
ca53c12c8b Python 2.1 doesn't have True and False 2003-03-12 02:54:17 +00:00
Kurt B. Kaiser
7c22132069 M rpc.py
M run.py
1. Clarify that rpc.SocketIO._getresponse() currently blocks on socket.
2. Improve exception handling in subprocess when GUI terminates abruptly.
2003-03-11 22:55:56 +00:00
Jack Jansen
dded84802a Allow unicode pathnames where FSRefs are expected. Fixes 696253. 2003-03-11 21:48:57 +00:00
Guido van Rossum
315aa361fc Add 'audio' resource.
ALERT! A month ago or so I made test_ossaudiodev.py require the
'audio' resource, but I didn't make the necessary changes to
regrtest.py.  This means that *nobody* has been testing the oss module
all that time!
2003-03-11 14:46:48 +00:00
Jack Jansen
47e5987256 Patch by Andrew Straw: use urllib2 so proxie access works. 2003-03-11 14:37:19 +00:00
Barry Warsaw
f9e0bd8df8 Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
2003-03-11 05:10:46 +00:00
Barry Warsaw
df6c70b454 beta 1 2003-03-11 05:05:21 +00:00
Barry Warsaw
bd757ba1ed Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
2003-03-11 05:04:54 +00:00
Barry Warsaw
cbec700b49 __init__(): Don't add a newline to _text if it doesn't already end in
one.  Possibly controversial.
2003-03-11 05:04:09 +00:00
Barry Warsaw
12dc230c00 body_line_iterator(): Accept optional decode argument, pass through to
Message.get_payload().
2003-03-11 04:41:35 +00:00
Barry Warsaw
08898499b2 get_payload(): Teach this about various uunencoded
Content-Transfer-Encodings
2003-03-11 04:33:30 +00:00
Barry Warsaw
3840b49d9c test_get_decoded_uu_payload(): A new test for
Content-Transfer-Encoding: x-uuencode
2003-03-11 04:31:37 +00:00
Kurt B. Kaiser
9ac783d723 M PyShell.py
M rpc.py
Improve exception handing if peer process has terminated.
2003-03-10 20:42:24 +00:00
Kurt B. Kaiser
98b15ab980 A interruptmodule.c
M setup.py
Implements an interrupt extension module which allows a subthread
to raise an interrupt in the main thread.
2003-03-10 20:41:07 +00:00
Barry Warsaw
a2369928b5 specialsre, escapesre: In SF bug #663369, Matthew Woodcraft points out
that backslashes must be escaped in character sets.
2003-03-10 19:20:18 +00:00
Barry Warsaw
a2e64702ca test_escape_backslashes(): A test for SF bug #663369 by Matthew Woodcraft. 2003-03-10 19:18:34 +00:00
Barry Warsaw
59e98ae1c5 _bdecode(): Remove redundant check. 2003-03-10 17:36:04 +00:00
Barry Warsaw
513af770d7 Fix base class 2003-03-10 17:00:43 +00:00
Barry Warsaw
e1ff4bbce6 Use ndiffAssertEqual in a couple of places for better error reporting. 2003-03-10 16:59:34 +00:00
Barry Warsaw
21191d3e31 get_payload(): If we get a low-level binascii.Error when base64
decoding the payload, just return it as-is.
2003-03-10 16:13:14 +00:00
Barry Warsaw
3efb651ea3 test_broken_base64_payload(): Test for crash in low-level binascii
module when decoding a message with broken base64.
2003-03-10 16:09:51 +00:00
Martin v. Löwis
a57dccdcd4 Patch #700839: Fix bugs in the plural handling. 2003-03-10 16:01:43 +00:00
Andrew M. Kuchling
a416341b30 [Patch #649762] Fix for asynchat endless loop
When the null string is used as the terminator, it used to be the same
as None, meaning "collect all the data".  In the current code, however, it
falls into an endless loop; this change reverts to the old behavior.
2003-03-10 15:16:54 +00:00
Barry Warsaw
5b8c69f11e _split_ascii() [method and function]: Don't join the lines just to
split them again.  Simply return them as chunk lists.

_encode_chunks(): Don't add more folding whitespace than necessary.
2003-03-10 15:14:08 +00:00
Andrew M. Kuchling
faef74a2b0 Use isinstance() instead of type comparison 2003-03-10 15:12:00 +00:00
Barry Warsaw
796376338f test_another_long_multiline_header(): Yet another formatting test. 2003-03-10 15:11:29 +00:00
Raymond Hettinger
1fdb633530 SF patch #691928: Use datetime in _strptime
Contributed by Brett Cannon.

To prevent code duplication, I patched _strptime to use datetime's date
object to do Julian day, Gregorian, and day of the week calculations.

Patch also includes new regression tests to test results and the
calculation gets triggered.

Very minor comment changes and the contact email are also changed.
2003-03-09 07:44:42 +00:00
Raymond Hettinger
2c2d322884 SF patch #667730: More DictMixin
* Adds missing pop() methods to weakref.py
* Expands test suite to broaden coverage of objects with
  a mapping interface.

Contributed by Sebastien Keim.
2003-03-09 07:05:43 +00:00
Raymond Hettinger
42182ebaf6 SF 698520: Iterator for urllib.URLOpener
Contributed by Brett Cannon.
2003-03-09 05:33:33 +00:00
Martin v. Löwis
c49435c991 Skip the test if TESTFN_ENCODING is None. Fixes #699386. 2003-03-08 10:25:31 +00:00
Barry Warsaw
33975eac3d _split_ascii(): lstrip the individual lines in the ascii split lines,
since we'll be adding our own continuation whitespace later.
2003-03-07 23:24:34 +00:00
Barry Warsaw
28ffcef4e6 test_long_unbreakable_lines_with_continuation(): Another funky example
from Jason Mastaler :)
2003-03-07 23:23:04 +00:00
Barry Warsaw
8e1e7f5468 decode_rfc2231(): RFC 2231 allows leaving out both the charset and
language without including any single quotes.
2003-03-07 22:46:41 +00:00
Barry Warsaw
21fcc4e287 test_rfc2231_no_language_or_charset(): RFC 2231 allows leaving out
both the charset and language without including any single quotes.
2003-03-07 22:45:55 +00:00
Tim Peters
61cd0db3d2 Don't quote the path to Python unless the path contains an embedded space.
Quoting the path doesn't work on Win2K (cmd.exe) regardless, this is just
a hack to let the test pass again on Win2K (so long as Python isn't
installed in a path that does contain an embedded space).  On Win2K it
looks like we'd also have to add a second pair of double quotes, around
the entire command line.
2003-03-07 21:10:21 +00:00
Tim Peters
669454e9dc Whitespace normalization. 2003-03-07 17:30:48 +00:00
Barry Warsaw
bf7e241397 whitespace normalization 2003-03-07 15:58:51 +00:00
Tim Peters
eabafebfbc This test relied on significant trailing whitespace in a string literal.
Evil.
2003-03-07 15:55:36 +00:00