summaryrefslogtreecommitdiffstats
path: root/Lib/mailbox.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge #19037: adjust file times *before* moving maildir files into place.R David Murray2013-09-181-5/+13
|\
| * #19037: adjust file times *before* moving maildir files into place.R David Murray2013-09-181-5/+13
| | | | | | | | | | This avoids race conditions when other programs are monitoring the maildir directory. Patch by janzert.
* | Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-1/+1
| |
* | Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-1/+1
| | | | | | | | ModuleNotFoundError.
* | modernize some modules' code by replacing ↵Giampaolo Rodola'2013-02-121-27/+14
| | | | | | | | OSError->ENOENT/ENOTDIR/EPERM/EEXIST occurrences with the corresponding pep-3151 exceptions (FileNotFoundError, NotADirectoryError, etc.)
* | modernize some modules' code by using with statement around open()Giampaolo Rodola'2013-02-121-14/+4
| |
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-8/+8
| |
* | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-4/+2
| |
* | #16135: Removal of OS/2 support (Remove OS2 and OS/2 references)Jesus Cea2012-10-051-3/+0
| |
* | utilize yield fromPhilip Jenvey2012-10-011-2/+1
|/
* #15222: Merge 3.2Petri Lehtinen2012-09-251-6/+38
|\
| * #15222: Insert blank line after each message in mbox mailboxesPetri Lehtinen2012-09-251-6/+38
| |
* | #11062: Fix universal newline support in Babyl._install_message()Petri Lehtinen2012-08-161-3/+10
|\ \ | |/
| * #11062: Fix universal newline support in Babyl._install_message()Petri Lehtinen2012-08-161-3/+10
| | | | | | | | | | When adding a message from a binary file, \r\n was translated to \r\r\n in the message body.
* | #11062: Fix adding a message from file to Babyl mailboxPetri Lehtinen2012-08-151-1/+1
|\ \ | |/
| * #11062: Fix adding a message from file to Babyl mailboxPetri Lehtinen2012-08-151-1/+1
| |
* | #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()Petri Lehtinen2012-06-291-0/+3
|\ \ | |/
| * #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()Petri Lehtinen2012-06-291-0/+3
| |
* | #9559: Don't call _pre_mailbox_hook more than oncePetri Lehtinen2012-06-291-2/+5
|\ \ | |/
| * #9559: Don't call _pre_mailbox_hook more than oncePetri Lehtinen2012-06-291-2/+5
| |
* | #9559: Append data to single-file mailbox files if messages are only addedPetri Lehtinen2012-06-281-3/+15
|\ \ | |/ | | | | | | | | 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-3/+15
| | | | | | | | | | | | 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/+1
|\ \ | |/
| * #15036: Make a repeated changes and flushes work with single-file mailboxesPetri Lehtinen2012-06-151-0/+1
| |
* | #12537: in mailbox avoid depending on knowledge of email package internalsR David Murray2012-04-091-3/+12
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix Maildir initialization so that maildir contents are read correctly.Petri Lehtinen2011-11-051-5/+3
|\ \ | |/ | | | | Closes #13254.
| * Fix Maildir initialization so that maildir contents are read correctly.Petri Lehtinen2011-11-051-5/+3
| | | | | | | | Closes #13254.
* | Close #12454: The mailbox module is now using ASCII, instead of the localeVictor Stinner2011-10-171-5/+2
|/ | | | encoding, to read and write MH mailboxes (.mh_sequences files).
* #11700: proxy object close methods can now be called multiple timesR David Murray2011-06-181-4/+10
| | | | This makes them work like the close provided by regular file objects.
* #11767: use context manager to close file in __getitem__ to prevent FD leakR David Murray2011-06-171-1/+3
| | | | | | | | 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-37/+39
|\
| * #11999: sync based on comparing mtimes, not mtime to system clockR David Murray2011-05-071-36/+40
| |
| * Merged revisions 83385-83389,83391 via svnmerge fromGeorg Brandl2010-08-011-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r83385 | georg.brandl | 2010-08-01 08:42:45 +0200 (So, 01 Aug 2010) | 1 line #8773: mailbox.py does not need to be executable. ........ r83386 | georg.brandl | 2010-08-01 08:44:46 +0200 (So, 01 Aug 2010) | 1 line #8768: name test method properly so that it gets executed. ........ r83387 | georg.brandl | 2010-08-01 08:53:28 +0200 (So, 01 Aug 2010) | 1 line #8735: better explain semantics of *values* argument for parse(). ........ r83388 | georg.brandl | 2010-08-01 09:48:43 +0200 (So, 01 Aug 2010) | 1 line #7395: fix traceback in do_add() when no stats are loaded. Apply same fix for do_sort() and do_reverse(). ........ r83389 | georg.brandl | 2010-08-01 09:57:47 +0200 (So, 01 Aug 2010) | 1 line Small improvements to pstats browser: do not crash on reading invalid file, and actually do a reload when executing "read" as intended. ........ r83391 | georg.brandl | 2010-08-01 10:10:08 +0200 (So, 01 Aug 2010) | 1 line Add another news entry. ........
| * Merged revisions 76055 via svnmerge fromAntoine Pitrou2009-11-021-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 88730 via svnmerge fromR. David Murray2011-03-031-3/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88730 | r.david.murray | 2011-03-03 13:03:36 -0500 (Thu, 03 Mar 2011) | 2 lines #11306: Treat EROFS like EACCES when making a 'file is read-only' decision ........
* | Fix #11116 fix on Windows (close file before removing in MH code)R. David Murray2011-02-121-1/+8
| |
* | #11116: roll back on error during add so mailbox isn't left corrupted.R. David Murray2011-02-111-6/+18
| |
* | #9124: mailbox now accepts binary input and uses binary internallyR. David Murray2011-01-301-119/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix test_mailbox by supporting context manager protocol for get_file() returns.Georg Brandl2010-10-301-0/+14
| |
* | #8773: mailbox.py does not need to be executable.Georg Brandl2010-08-011-0/+0
| |
* | Merged revisions ↵Benjamin Peterson2010-03-211-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........
* | convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
| |
* | Merged revisions ↵Benjamin Peterson2009-11-251-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75264,75268,75293,75318,75391-75392,75436,75478,75971,76003,76058,76140-76141,76231,76380,76428-76429 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75264 | andrew.kuchling | 2009-10-05 17:30:22 -0500 (Mon, 05 Oct 2009) | 1 line Add various items ........ r75268 | andrew.kuchling | 2009-10-05 17:45:39 -0500 (Mon, 05 Oct 2009) | 1 line Remove two notes ........ r75293 | kristjan.jonsson | 2009-10-09 09:32:19 -0500 (Fri, 09 Oct 2009) | 2 lines http://bugs.python.org/issue7029 a non-default timer wasn't actually used by the individual Tests. ........ r75318 | benjamin.peterson | 2009-10-10 16:15:58 -0500 (Sat, 10 Oct 2009) | 1 line remove script which uses long gone module ........ r75391 | andrew.kuchling | 2009-10-13 10:49:33 -0500 (Tue, 13 Oct 2009) | 1 line Link to PEP ........ r75392 | andrew.kuchling | 2009-10-13 11:11:49 -0500 (Tue, 13 Oct 2009) | 1 line Various link, textual, and markup fixes ........ r75436 | benjamin.peterson | 2009-10-15 10:39:15 -0500 (Thu, 15 Oct 2009) | 1 line don't need to mess up sys.path ........ r75478 | senthil.kumaran | 2009-10-17 20:58:45 -0500 (Sat, 17 Oct 2009) | 3 lines Fix a typo. ........ r75971 | benjamin.peterson | 2009-10-30 22:56:15 -0500 (Fri, 30 Oct 2009) | 1 line add some checks for evaluation order with parenthesis #7210 ........ r76003 | antoine.pitrou | 2009-10-31 19:30:13 -0500 (Sat, 31 Oct 2009) | 6 lines Hopefully fix the buildbot problems on test_mailbox, by computing the maildir toc cache refresh date before actually refreshing the cache. (see #6896) ........ r76058 | benjamin.peterson | 2009-11-02 10:14:19 -0600 (Mon, 02 Nov 2009) | 1 line grant list.index() a more informative error message #7252 ........ r76140 | nick.coghlan | 2009-11-07 02:13:55 -0600 (Sat, 07 Nov 2009) | 1 line Add test for runpy.run_module package execution and use something other than logging as the example of a non-executable package ........ r76141 | nick.coghlan | 2009-11-07 02:15:01 -0600 (Sat, 07 Nov 2009) | 1 line Some minor cleanups to private runpy code and docstrings ........ r76231 | benjamin.peterson | 2009-11-12 17:42:23 -0600 (Thu, 12 Nov 2009) | 1 line this main is much more useful ........ r76380 | antoine.pitrou | 2009-11-18 14:20:46 -0600 (Wed, 18 Nov 2009) | 3 lines Mention Giampolo R's new FTP TLS support in the what's new file ........ r76428 | benjamin.peterson | 2009-11-19 20:15:50 -0600 (Thu, 19 Nov 2009) | 1 line turn goto into do while loop ........ r76429 | benjamin.peterson | 2009-11-19 20:56:43 -0600 (Thu, 19 Nov 2009) | 2 lines avoid doing an uneeded import in a function ........
* | Merged revisions 76034,76054 via svnmerge fromAntoine Pitrou2009-11-021-1/+12
|/ | | | | | | | | | | | | | 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 72213 via svnmerge fromAndrew M. Kuchling2009-05-031-4/+24
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72213 | andrew.kuchling | 2009-05-02 15:17:28 -0400 (Sat, 02 May 2009) | 3 lines #1607951: Make mailbox.Maildir re-read the directories less frequently. This is done by recording the current time -1sec, and not re-reading unless the directory mod. times are >= the recorded time. ........
* In 3k this becomes an items() call.R. David Murray2009-04-021-1/+1
| | | | | | | | | | | | | Merged revisions 71046 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71046 | r.david.murray | 2009-04-02 10:05:35 -0400 (Thu, 02 Apr 2009) | 4 lines Add missing iteritems() call to the for loop in mailbox.MH.get_message(). Fixes issue2625. ........
* Merged revisions ↵Georg Brandl2008-08-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 65459,65472,65481,65518,65536,65581,65609,65637,65641,65644-65645 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65459 | gregory.p.smith | 2008-08-04 00:13:29 +0000 (Mon, 04 Aug 2008) | 4 lines - Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword argument in python 2.5, this broke code that subclassed Popen to include its own poll method. Fixed my moving _deadstate to an _internal_poll method. ........ r65472 | andrew.kuchling | 2008-08-04 01:43:43 +0000 (Mon, 04 Aug 2008) | 3 lines Bug 3228: Explicitly supply the file mode to avoid creating executable files, and add corresponding tests. Possible 2.5 backport candidate ........ r65481 | gregory.p.smith | 2008-08-04 07:33:37 +0000 (Mon, 04 Aug 2008) | 22 lines Adds a sanity check to avoid a *very rare* infinite loop due to a corrupt tls key list data structure in the thread startup path. This change is a companion to r60148 which already successfully dealt with a similar issue on thread shutdown. In particular this loop has been observed happening from this call path: #0 in find_key () #1 in PyThread_set_key_value () #2 in _PyGILState_NoteThreadState () #3 in PyThreadState_New () #4 in t_bootstrap () #5 in pthread_start_thread () I don't know how this happens but it does, *very* rarely. On more than one hardware platform. I have not been able to reproduce it manually. (A flaky mutex implementation on the system in question is one hypothesis). As with r60148, the spinning we managed to observe in the wild was due to a single list element pointing back upon itself. ........ r65518 | mark.dickinson | 2008-08-04 21:30:09 +0000 (Mon, 04 Aug 2008) | 7 lines Issue #1481296: (again!) Make conversion of a float NaN to an int or long raise ValueError instead of returning 0. Also, change the error message for conversion of an infinity to an integer, replacing 'long' by 'integer', so that it's appropriate for both long(float('inf')) and int(float('inf')). ........ r65536 | andrew.kuchling | 2008-08-05 01:00:57 +0000 (Tue, 05 Aug 2008) | 1 line Bug 3228: take a test from Niels Gustaebel's patch, and based on his patch, check for having os.stat available ........ r65581 | guido.van.rossum | 2008-08-07 18:51:38 +0000 (Thu, 07 Aug 2008) | 3 lines Patch by Ian Charnas from issue 3517. Add F_FULLFSYNC if it exists (OS X only so far). ........ r65609 | antoine.pitrou | 2008-08-09 17:22:25 +0000 (Sat, 09 Aug 2008) | 3 lines #3205: bz2 iterator fails silently on MemoryError ........ r65637 | georg.brandl | 2008-08-11 09:07:59 +0000 (Mon, 11 Aug 2008) | 3 lines - Issue #3537: Fix an assertion failure when an empty but presized dict object was stored in the freelist. ........ r65641 | jesse.noller | 2008-08-11 14:28:07 +0000 (Mon, 11 Aug 2008) | 2 lines Remove the fqdn call for issue 3270 ........ r65644 | antoine.pitrou | 2008-08-11 17:21:36 +0000 (Mon, 11 Aug 2008) | 3 lines #3134: shutil referenced undefined WindowsError symbol ........ r65645 | jesse.noller | 2008-08-11 19:00:15 +0000 (Mon, 11 Aug 2008) | 2 lines Fix the connection refused error part of issue 3419, use errno module instead of a static list of possible connection refused messages. ........
* #756982: Remove rfc822 reference.Georg Brandl2008-05-111-2/+1
|
* fix __all__Benjamin Peterson2008-05-111-2/+1
|
* #2814: remove deprecated classes from mailbox module. Patch by Humberto ↵Georg Brandl2008-05-111-178/+0
| | | | Diogenes.