summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_mailbox.py
Commit message (Collapse)AuthorAgeFilesLines
* Closes #16135: Removal of OS/2 supportJesus Cea2012-10-051-1/+1
|
* #15222: Merge 3.2Petri Lehtinen2012-09-251-15/+38
|\
| * #15222: Insert blank line after each message in mbox mailboxesPetri Lehtinen2012-09-251-0/+23
| |
| * #15222: test_mailbox: End message template in a newlinePetri Lehtinen2012-09-251-15/+15
| |
* | #15802: Fix test logic in TestMaildir.test_create_tmpPetri Lehtinen2012-09-011-5/+5
|\ \ | |/
| * #15802: Fix test logic in TestMaildir.test_create_tmpPetri Lehtinen2012-09-011-5/+5
| |
* | #11062: Fix adding a message from file to Babyl mailboxPetri Lehtinen2012-08-151-12/+6
|\ \ | |/
| * #11062: Fix adding a message from file to Babyl mailboxPetri Lehtinen2012-08-151-12/+6
| |
* | #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()Petri Lehtinen2012-06-291-0/+17
|\ \ | |/
| * #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()Petri Lehtinen2012-06-291-0/+17
| |
* | #9559: Append data to single-file mailbox files if messages are only addedPetri Lehtinen2012-06-281-2/+27
|\ \ | |/ | | | | | | | | If messages were only added, a new file is no longer created and renamed over the old file when flush() is called on an mbox, MMDF or Babyl mailbox.
| * #9559: Append data to single-file mailbox files if messages are only addedPetri Lehtinen2012-06-281-2/+27
| | | | | | | | | | | | If messages were only added, a new file is no longer created and renamed over the old file when flush() is called on an mbox, MMDF or Babyl mailbox.
* | #15036: Make a repeated changes and flushes work with single-file mailboxesPetri Lehtinen2012-06-151-0/+11
|\ \ | |/
| * #15036: Make a repeated changes and flushes work with single-file mailboxesPetri Lehtinen2012-06-151-0/+11
| |
* | #12537: in mailbox avoid depending on knowledge of email package internalsR David Murray2012-04-091-0/+23
| | | | | | | | | | | | | | | | | | | | | | Previously mailbox was copying a list of attributes from one message object to another in order to "copy the message data". This means that any time new attributes were added to email.message.Message, mailbox broke. Now instead it copies all attributes from the source object to the target object, skipping any mailbox-object-specific attributes to produce the same clean initial state it was previously getting by copying only the "known" attributes. David Lam assisted in the development of this patch.
* | Remove redundancy in listing of all mailbox classes in test_mailbox.R David Murray2012-04-091-15/+9
| |
* | Merge: Make test_mailbox runnable via python -m unittest.R David Murray2012-04-081-17/+17
|\ \ | |/
| * Make test_mailbox runnable via python -m unittest.R David Murray2012-04-081-17/+17
| |
* | Merge #14291: if a header has non-ascii unicode, default to CTE using utf-8R David Murray2012-03-141-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | In Python2, if a unicode string was assigned as the value of a header, email would automatically CTE encode it using the UTF8 charset. This capability was lost in the Python3 translation, and this patch restores it. Patch by Ali Ikinci, assisted by R. David Murray. I also added a fix for the mailbox test that was depending (with a comment that it was a bad idea to so depend) on non-ASCII causing message_from_string to raise an error. It now uses support.patch to induce an error during message serialization.
| * #14291: if a header has non-ascii unicode, default to CTE using utf-8R David Murray2012-03-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python2, if a unicode string was assigned as the value of a header, email would automatically CTE encode it using the UTF8 charset. This capability was lost in the Python3 translation, and this patch restores it. Patch by Ali Ikinci, assisted by R. David Murray. I also added a fix for the mailbox test that was depending (with a comment that it was a bad idea to so depend) on non-ASCII causing message_from_string to raise an error. It now uses support.patch to induce an error during message serialization.
* | Closes #14158: merged test file resilience fix from 3.2.Vinay Sajip2012-03-021-6/+6
|\ \ | |/
| * Closes #14158: improved resilience to test files left behind.Vinay Sajip2012-03-021-6/+6
| |
* | Followup to issue #11867: Use socketpair(), since FreeBSD < 8 doesn't reallyCharles-François Natali2011-12-201-11/+8
|\ \ | |/ | | | | support multiprocessing.Event.
| * Followup to issue #11867: Use socketpair(), since FreeBSD < 8 doesn't reallyCharles-François Natali2011-12-201-11/+8
| | | | | | | | support multiprocessing.Event.
* | Issue #11867: Make test_mailbox.test_lock_conflict deterministic (and fix aCharles-François Natali2011-12-191-9/+21
|\ \ | |/ | | | | race condition).
| * Issue #11867: Make test_mailbox.test_lock_conflict deterministic (and fix aCharles-François Natali2011-12-191-9/+21
| | | | | | | | race condition).
* | Merge branch 3.2Petri Lehtinen2011-11-121-3/+9
|\ \ | |/
| * Update mailbox.Maildir testsPetri Lehtinen2011-11-121-3/+9
| | | | | | | | | | | | | | | | Remove a sleep to fix transient test failures. Use skewfactor of -3 to make it work on systems that have 1 second precision for time.time(). Closes #11999 Refs #13254
* | Fix Maildir initialization so that maildir contents are read correctly.Petri Lehtinen2011-11-051-0/+21
|\ \ | |/ | | | | Closes #13254.
| * Fix Maildir initialization so that maildir contents are read correctly.Petri Lehtinen2011-11-051-0/+21
| | | | | | | | Closes #13254.
* | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-2/+1
| | | | | | | | | | | | | | We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle).
* | merge #11700: proxy object close methods can now be called multiple timesR David Murray2011-06-181-1/+12
|\ \ | |/
| * #11700: proxy object close methods can now be called multiple timesR David Murray2011-06-181-1/+12
| | | | | | | | This makes them work like the close provided by regular file objects.
* | merge #11767: use context manager to close file in __getitem__ to prevent FD ↵R David Murray2011-06-171-1/+32
|\ \ | |/ | | | | leak
| * #11767: use context manager to close file in __getitem__ to prevent FD leakR David Murray2011-06-171-1/+32
| | | | | | | | | | | | | | | | All of the other methods in mailbox that create message objects take care to close the file descriptors they use, so it seems to make sense to have __getitem__ do so as well. Patch by Filip Gruszczyński.
* | #11999: sync based on comparing mtimes, not mtime to system clockR David Murray2011-05-071-13/+10
|\ \ | |/
| * #11999: sync based on comparing mtimes, not mtime to system clockR David Murray2011-05-071-13/+10
| |\
| | * #11999: sync based on comparing mtimes, not mtime to system clockR David Murray2011-05-071-13/+10
| | |
* | | Merge #9557: eliminate 3 seconds of static overhead from test_mailbox.R David Murray2011-03-251-7/+11
|\ \ \ | |/ /
| * | Merge #9557: eliminate 3 seconds of static overhead from test_mailbox.R David Murray2011-03-251-7/+11
| |\ \ | | |/
| | * #9557: eliminate 3 seconds of static overhead from test_mailbox.R David Murray2011-03-251-7/+11
| | | | | | | | | | | | | | | This patch doesn't quite fix the 'run in a VM with Samba share' timing problem, but it should at least make it better.
| | * Merged revisions 76055 via svnmerge fromAntoine Pitrou2009-11-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76055 | antoine.pitrou | 2009-11-02 12:36:51 +0100 (lun., 02 nov. 2009) | 13 lines Merged revisions 76034,76054 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76034 | antoine.pitrou | 2009-11-01 22:29:33 +0100 (dim., 01 nov. 2009) | 3 lines This should finally fix #6896. Let's watch the buildbots. ........ r76054 | antoine.pitrou | 2009-11-02 12:34:27 +0100 (lun., 02 nov. 2009) | 3 lines Since r76034 was successful, add a NEWS entry for it. ........ ................
| | * Merged revisions 74126,74130-74131,74149,74155,74157,74180-74183,74398 via ↵Georg Brandl2009-08-131-64/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74126 | alexandre.vassalotti | 2009-07-21 02:39:03 +0200 (Di, 21 Jul 2009) | 14 lines Merged revisions 73871 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73871 | alexandre.vassalotti | 2009-07-06 22:17:30 -0400 (Mon, 06 Jul 2009) | 7 lines Grow the allocated buffer in PyUnicode_EncodeUTF7 to avoid buffer overrun. Without this change, test_unicode.UnicodeTest.test_codecs_utf7 crashes in debug mode. What happens is the unicode string u'\U000abcde' with a length of 1 encodes to the string '+2m/c3g-' of length 8. Since only 5 bytes is reserved in the buffer, a buffer overrun occurs. ........ ................ r74130 | alexandre.vassalotti | 2009-07-21 02:57:50 +0200 (Di, 21 Jul 2009) | 2 lines Add ignore rule for the Doc/tools/jinga2/ directory. ................ r74131 | alexandre.vassalotti | 2009-07-21 04:51:58 +0200 (Di, 21 Jul 2009) | 13 lines Merged revisions 73683,73786 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73683 | georg.brandl | 2009-06-29 10:44:49 -0400 (Mon, 29 Jun 2009) | 1 line Fix error handling in PyCode_Optimize, by Alexander Schremmer at EuroPython sprint. ........ r73786 | benjamin.peterson | 2009-07-02 18:56:16 -0400 (Thu, 02 Jul 2009) | 1 line condense with assertRaises ........ ................ r74149 | ezio.melotti | 2009-07-21 22:37:52 +0200 (Di, 21 Jul 2009) | 9 lines Merged revisions 74148 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74148 | ezio.melotti | 2009-07-21 23:18:27 +0300 (Tue, 21 Jul 2009) | 1 line #6536 fixed typo ........ ................ r74155 | alexandre.vassalotti | 2009-07-22 04:24:49 +0200 (Mi, 22 Jul 2009) | 2 lines Issue #6242: Fix deallocator of io.StringIO and io.BytesIO. ................ r74157 | alexandre.vassalotti | 2009-07-22 05:07:33 +0200 (Mi, 22 Jul 2009) | 2 lines Issue #6241: Better type checking for the arguments of io.StringIO. ................ r74180 | ezio.melotti | 2009-07-22 23:17:14 +0200 (Mi, 22 Jul 2009) | 9 lines Merged revisions 74179 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74179 | ezio.melotti | 2009-07-23 00:08:49 +0300 (Thu, 23 Jul 2009) | 1 line #6423 has_key -> in ........ ................ r74181 | alexandre.vassalotti | 2009-07-22 23:27:53 +0200 (Mi, 22 Jul 2009) | 6 lines Clean up test_curses. By using __stdout__ directly, test_curses caused regrtest.py to duplicate the output of some test results. ................ r74182 | alexandre.vassalotti | 2009-07-22 23:29:01 +0200 (Mi, 22 Jul 2009) | 2 lines Use assertGreater instead of assertTrue(x > y). ................ r74183 | alexandre.vassalotti | 2009-07-23 01:27:17 +0200 (Do, 23 Jul 2009) | 4 lines Specialize assertTrue checks when possible. We should get slightly more helpful failure messages with this change. ................ r74398 | georg.brandl | 2009-08-13 11:16:39 +0200 (Do, 13 Aug 2009) | 1 line #6694: fix old function names. ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-87/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-3/+3
|/ / | | | | | | | | | | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
* | #11116: roll back on error during add so mailbox isn't left corrupted.R. David Murray2011-02-111-1/+31
| |
* | #9124: mailbox now accepts binary input and uses binary internallyR. David Murray2011-01-301-12/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although this patch contains API changes and is rather weighty for an RC phase, the mailbox module was essentially unusable without the patch since it would produce UnicodeErrors when handling non-ascii input at arbitrary and somewhat mysterious places, and any non-trivial amount of email processing will encounter messages with non-ascii bytes. The release manager approved the patch application. The changes allow binary input, and reject non-ASCII string input early with a useful message instead of failing mysteriously later. Binary is used internally for reading and writing the mailbox files. StringIO and Text file input are deprecated. Initial patch by Victor Stinner, validated and expanded by R. David Murray.
* | Silence some ResourceWarning in test_mailbox by using file context managers.Brett Cannon2010-10-301-2/+6
| | | | | | | | Also call super().tearDown() where appropriate.
* | Implement #7944. Use `with` throughout the test suite.Brian Curtin2010-10-131-23/+19
| |
* | Merged revisions ↵Benjamin Peterson2010-03-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 77952,78030,78102,78104,78107,78206,78216,78296-78297,78328,78331-78332,78336,78339,78343,78378-78379,78415,78559,78717,78791 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77952 | mark.dickinson | 2010-02-03 10:50:14 -0600 (Wed, 03 Feb 2010) | 1 line Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942). ........ r78030 | benjamin.peterson | 2010-02-06 14:14:10 -0600 (Sat, 06 Feb 2010) | 1 line check type_getattro for correctness in a descriptor corner case ........ r78102 | andrew.kuchling | 2010-02-07 19:35:35 -0600 (Sun, 07 Feb 2010) | 1 line Move distutils into its own subsection; add various items ........ r78104 | andrew.kuchling | 2010-02-08 07:22:24 -0600 (Mon, 08 Feb 2010) | 1 line Add two items; move a subsection ........ r78107 | antoine.pitrou | 2010-02-08 14:25:47 -0600 (Mon, 08 Feb 2010) | 3 lines Clarify and correct description for ccbench and iobench. ........ r78206 | r.david.murray | 2010-02-16 11:55:26 -0600 (Tue, 16 Feb 2010) | 3 lines Make the references to Popen in the description of Call and check_call into links. ........ r78216 | andrew.kuchling | 2010-02-18 08:16:48 -0600 (Thu, 18 Feb 2010) | 1 line Add various items ........ r78296 | andrew.kuchling | 2010-02-21 20:08:45 -0600 (Sun, 21 Feb 2010) | 1 line Re-word ........ r78297 | andrew.kuchling | 2010-02-21 20:29:10 -0600 (Sun, 21 Feb 2010) | 1 line #7076: mention SystemRandom class near start of the module docs; reword change description for clarity. Noted by Shawn Ligocki. ........ r78328 | jack.diederich | 2010-02-22 12:17:16 -0600 (Mon, 22 Feb 2010) | 1 line fixes issue #7530, serve_forever() ........ r78331 | andrew.kuchling | 2010-02-22 12:38:23 -0600 (Mon, 22 Feb 2010) | 1 line Fix comment typo ........ r78332 | andrew.kuchling | 2010-02-22 12:42:07 -0600 (Mon, 22 Feb 2010) | 2 lines #7627: MH.remove() would fail if the MH mailbox was locked; it would call _unlock_file() and pass it a closed file object. Noted by Rob Austein. ........ r78336 | jack.diederich | 2010-02-22 13:55:22 -0600 (Mon, 22 Feb 2010) | 1 line fixes issue #1522237, bad init check in _threading_local ........ r78339 | jack.diederich | 2010-02-22 15:27:38 -0600 (Mon, 22 Feb 2010) | 1 line * fix issue#7476 ........ r78343 | andrew.kuchling | 2010-02-22 16:48:41 -0600 (Mon, 22 Feb 2010) | 10 lines #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c. Noted by Joseph Armbruster; patch by Jessica McKellar. The original code was 'for (;;) {...}', where ... ended with a 'return -2' statement and did not contain a 'break' or 'continue' statement. Therefore, the body of the loop is always executed once. Once upon a time there was a 'continue' in the loop, but it was removed in rev36346, committed by mwh on Wed Jul 7 17:44:12 2004. ........ r78378 | jack.diederich | 2010-02-23 11:23:30 -0600 (Tue, 23 Feb 2010) | 1 line fixup markup error ........ r78379 | jack.diederich | 2010-02-23 13:34:06 -0600 (Tue, 23 Feb 2010) | 1 line issue#6442 use in operator instead of has_key ........ r78415 | dirkjan.ochtman | 2010-02-23 22:00:52 -0600 (Tue, 23 Feb 2010) | 1 line Issue #7733: add explicit reference in asyncore docs. ........ r78559 | andrew.kuchling | 2010-03-01 13:45:21 -0600 (Mon, 01 Mar 2010) | 1 line #7637: update discussion of minidom.unlink() and garbage collection ........ r78717 | benjamin.peterson | 2010-03-05 21:13:33 -0600 (Fri, 05 Mar 2010) | 1 line settscdump is definitely an implementation detail ........ r78791 | andrew.kuchling | 2010-03-08 06:00:39 -0600 (Mon, 08 Mar 2010) | 1 line Add various items ........