| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
it would call _unlock_file() and pass it a closed file object. Noted by Rob Austein.
|
| |
|
|
|
|
| |
mistake. ( It may come in for sure tough)
|
|
|
|
| |
Patch by flox
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is done by recording the current time -1sec, and not re-reading unless
the directory mod. times are >= the recorded time.
|
|
|
|
| |
Fixes issue2625.
|
|
|
|
| |
check for having os.stat available
|
|
|
|
|
| |
and add corresponding tests.
Possible 2.5 backport candidate
|
|
|
|
| |
Thanks to Wummel for the patch
|
|
|
|
|
|
| |
an open file. This doesn't seem to be a problem in 2.6, but that appears
to be somewhat accidental (specific to reference counting). When this
gets merged to 3.0, it will make the 3.0 code simpler.
|
|
|
|
| |
to the main mailbox, copy it to secondary mailbox instances.
|
|
|
|
|
|
| |
MaildirMessage.
2.5.2 bugfix candidate.
|
|
|
|
|
|
|
| |
The Maildir specification doesn't seem to say anything about this
situation, and it can happen if you're keeping a Maildir mailbox in
Subversion (.svn directories) or some similar system. The patch just
ignores directories in the cur/, new/, tmp/ folders.
|
|
|
|
|
|
| |
pass, but my guess is that it won't. I'm guessing that some other
test is leaving this file open which means it can't be removed
under Windows AFAIK.
|
|
|
|
| |
files that may exist but cause the test to fail). Should be backported (assuming it works :-)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Both the Maildir and MH classes had this bug; the patch fixes both classes
and adds a test.
Will backport to 25-maint.
|
| |
|
|
|
|
| |
in its flush() method, causing an error
|
|
|
|
|
|
| |
The first hunk changes the colon to an ! like other Windows variants.
We need to always wait on the child so the lock gets released and
no other tests fail. This is the try/finally in the second hunk.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?). This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children. The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either. Time will tell.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
consistent with os.wait() returning immediately because some other
subprocess had previously exited; the test suite then immediately
tries to lock the mailbox and gets an error saying it's already
locked.
To fix this, do a waitpid() so the test suite only continues once
the intended child process has exited.
|
| |
|
|
|
|
|
| |
On slow machines, maybe the time intervals (2 sec, 0.5 sec) will be too tight.
I'll see how the buildbots like it.
|
| |
|
|
|
|
|
| |
experiencing. (This code and mailbox.py itself are full of calls to file()
that should be calls to open() -- but I'm not fixing those.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the 2005 Summer of Code).
The revision adds a number of new mailbox classes that support adding
and removing messages; these classes also support mailbox locking and
default to using email.Message instead of rfc822.Message.
The old mailbox classes are largely left alone for backward compatibility.
The exception is the Maildir class, which was present in the old module
and now inherits from the new classes. The Maildir class's interface
is pretty simple, though, so I think it'll be compatible with existing
code.
(The change to the NEWS file also adds a missing word to a different
news item, which unfortunately required rewrapping the line.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".
This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).
Now Tim and Jack can have at it. :)
|
| |
|
|
|
|
|
| |
allows using the tests with unittest.py as a script. The tests will
still run when run as a script themselves.
|
|
|
|
| |
on the mac (where times are bigger than ints). Changed to int(time.time()%1000000).
|
|
|
|
| |
instead. Allows this test to finish on Windows again.
|
|
|
|
|
| |
for the Maildir mailbox format. This still does not address other mailbox
formats.
|
|
|
|
| |
Try to do it for them, so our mkdir() operation doesn't fail.
|
| |
|
|
|