Commit graph

4309 commits

Author SHA1 Message Date
Lars Gustäbel
a7ba6fc548 Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
Will backport to 2.5.
2006-12-27 10:30:46 +00:00
Lars Gustäbel
a4b2381b20 Patch #1262036: Prevent TarFiles from being added to themselves under
certain conditions.

Will backport to 2.5.
2006-12-23 17:57:23 +00:00
Lars Gustäbel
6baa502769 Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
work correctly together with readline().

Will backport to 2.5.
2006-12-23 16:40:13 +00:00
Andrew M. Kuchling
55c54a2fa1 Frak; this test also fails 2006-12-22 21:48:19 +00:00
Andrew M. Kuchling
f2881e8315 Darn; this test works when you run test_pty.py directly, but fails when regrtest runs it (the os.read() raises os.error). I can't figure out the cause, so am commenting out the test. 2006-12-22 19:21:27 +00:00
Andrew M. Kuchling
ee0e6d16b3 [Patch #783050 from Patrick Lynch] The emulation of forkpty() is incorrect;
the master should close the slave fd.

Added a test to test_pty.py that reads from the master_fd after doing
a pty.fork(); without the fix it hangs forever instead of raising an
exception.  (<crossing fingers for the buildbots>)

2.5 backport candidate.
2006-12-22 18:41:42 +00:00
Andrew M. Kuchling
3fa5e6ee45 [Bug #776202] Apply Walter Doerwald's patch to use text mode for encoded files 2006-12-22 16:43:26 +00:00
Andrew M. Kuchling
9ef0ef5b72 [Bug #802128 continued] Modify mode depending on the process umask.
Is there really no other way to read the umask than to set it?

Hope this works on Windows...
2006-12-22 15:16:58 +00:00
Andrew M. Kuchling
dc26758ffe [Bug #802128] Make the mode argument of dumbdbm actually work the way it's
described, and add a test for it.

2.5 bugfix candidate, maybe; arguably this patch changes the API of
dumbdbm and shouldn't be added in a point-release.
2006-12-22 15:04:45 +00:00
Georg Brandl
ded1c4df0b Testcase for patch #1484695. 2006-12-20 11:55:16 +00:00
Raymond Hettinger
94547f7646 Bug #1590891: random.randrange don't return correct value for big number
Needs to be backported.
2006-12-20 06:42:06 +00:00
Brett Cannon
6d9520c4f0 Add test.test_support.guard_warnings_filter . This function returns a context
manager that protects warnings.filter from being modified once the context is
exited.
2006-12-13 23:09:53 +00:00
Brett Cannon
c745df8519 Remove unneeded imports of 'warnings'. 2006-12-13 23:02:38 +00:00
Brett Cannon
905820ccba Remove an unneeded import of 'warnings'. 2006-12-13 22:31:37 +00:00
Walter Dörwald
da1ad32cec Fix typo. 2006-12-12 21:55:31 +00:00
Raymond Hettinger
c789f341bb Add test for SF bug 1576657 2006-12-08 17:35:25 +00:00
Georg Brandl
87fa559479 Patch #1610437: fix a tarfile bug with long filename headers. 2006-12-06 22:21:18 +00:00
Martin v. Löwis
a00bcac003 Patch #1371075: Make ConfigParser accept optional dict type
for ordering, sorting, etc.
2006-12-03 12:01:53 +00:00
Walter Dörwald
f008203cb4 Move xdrlib tests from the module into a separate test script,
port the tests to unittest and add a few new tests.
2006-12-01 16:59:47 +00:00
Michael W. Hudson
f390442130 a test for an error condition not covered by existing tests
(noticed this when writing the equivalent code for pypy)
2006-11-23 13:54:04 +00:00
Walter Dörwald
39b8b6afb5 Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))
SF bug #1601501.
2006-11-23 05:03:56 +00:00
Martin v. Löwis
07529354db Patch #1070046: Marshal new-style objects like InstanceType
in xmlrpclib.
2006-11-19 18:51:54 +00:00
Andrew M. Kuchling
9eec51c04f Add a test case of data w/ bytes > 127 2006-11-19 18:40:01 +00:00
Martin v. Löwis
cffcc8b195 Make cStringIO.truncate raise IOError for negative
arguments (even for -1). Fixes the last bit of
#1359365.
2006-11-19 10:41:41 +00:00
Georg Brandl
283a1353a0 Patch [ 1586791 ] better error msgs for some TypeErrors 2006-11-19 08:48:30 +00:00
Andrew M. Kuchling
db4f255c61 Expand checking in test_sha 2006-11-18 22:17:33 +00:00
Andrew M. Kuchling
8c456f3b57 Remove file-locking in MH.pack() method.
This change looks massive but it's mostly a re-indenting after
removing some try...finally blocks.

Also adds a test case that does a pack() while the mailbox is locked; this
test would have turned up bugs in the original code on some platforms.

In both nmh and GNU Mailutils' implementation of MH-format mailboxes,
no locking is done of individual message files when renaming them.

The original mailbox.py code did do locking, which meant that message
files had to be opened.  This code was buggy on certain platforms
(found through reading the code); there were code paths that closed
the file object and then called _unlock_file() on it.

Will backport to 25-maint once I see how the buildbots react to this patch.
2006-11-17 13:30:25 +00:00
Georg Brandl
25aabf4cbb Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
2006-11-16 17:08:45 +00:00
Martin v. Löwis
065f0c8a06 Patch #1355023: support whence argument for GzipFile.seek. 2006-11-12 10:41:39 +00:00
Martin v. Löwis
040a927cd1 Patch #1065257: Support passing open files as body in
HTTPConnection.request().
2006-11-12 10:32:47 +00:00
Andrew M. Kuchling
a3e5d3757c [Bug #1569790] mailbox.Maildir.get_folder() loses factory information
Both the Maildir and MH classes had this bug; the patch fixes both classes
and adds a test.

Will backport to 25-maint.
2006-11-09 13:27:07 +00:00
Martin v. Löwis
3a62404264 Correctly forward exception in instance_contains().
Fixes #1591996. Patch contributed by Neal Norwitz.
Will backport.
2006-11-08 06:46:37 +00:00
Neal Norwitz
85dbec6da7 Bug #1588287: fix invalid assertion for 1,2 in debug builds.
Will backport
2006-11-04 19:25:22 +00:00
Tim Peters
abd8a336a3 Whitespace normalization. 2006-11-03 02:32:46 +00:00
Neal Norwitz
1ead698494 I'm assuming this is correct, it fixes the tests so they pass again 2006-10-29 23:58:36 +00:00
Walter Dörwald
98c70acf47 Add tests for incremental codecs with an errors
argument.
2006-10-29 23:02:27 +00:00
Walter Dörwald
92911bfc6a Add tests for basic argument errors. 2006-10-29 22:06:28 +00:00
Georg Brandl
7d00099021 Move the check for openpty to the beginning. 2006-10-29 21:54:18 +00:00
Georg Brandl
59ba4299d0 Remove leftover test output file. 2006-10-29 20:35:12 +00:00
Georg Brandl
cd97208110 Convert test_openpty to unittest. 2006-10-29 20:31:17 +00:00
Georg Brandl
e8328ba723 Convert test_MimeWriter to unittest. 2006-10-29 20:28:26 +00:00
Georg Brandl
71a2089712 Completely convert test_httplib to unittest. 2006-10-29 20:24:01 +00:00
Georg Brandl
e184433654 Convert test_cgi to unittest. 2006-10-29 20:09:12 +00:00
Georg Brandl
a962eb32d9 Convert test_cookie to unittest. 2006-10-29 19:51:16 +00:00
Georg Brandl
bd0fb14e51 Convert test_types to unittest. 2006-10-29 19:35:03 +00:00
Georg Brandl
850b2be67e Convert test_nis to unittest. 2006-10-29 19:24:43 +00:00
Georg Brandl
eecce795a3 Convert test_poll to unittest. 2006-10-29 19:20:45 +00:00
Georg Brandl
3163179f1b Convert test_mmap to unittest. 2006-10-29 19:13:40 +00:00
Georg Brandl
b9f4ad3a9a Bug #1576657: when setting a KeyError for a tuple key, make sure that
the tuple isn't used as the "exception arguments tuple".
2006-10-29 18:31:42 +00:00
Georg Brandl
2c9838e30f Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders. 2006-10-29 14:39:09 +00:00