[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington
miss-islington added the comment: New changeset d1524148cd08f00c0b7c1dfdf698bf96c246350d by Miss Islington (bot) in branch '3.7': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/d1524148cd08f00c0b7c1dfdf698b

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington
miss-islington added the comment: New changeset b815669c833c543b0f6696c3121a179f6b2383a6 by Miss Islington (bot) in branch '3.8': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/b815669c833c543b0f6696c3121a1

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington
miss-islington added the comment: New changeset e44184749c2fd0921867ea5cd20b8e226c2146c2 by Miss Islington (bot) (Sviatoslav Sydorenko) in branch 'master': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/e44

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +14545 pull_request: https://github.com/python/cpython/pull/14750 ___ Python tracker ___ __

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +14544 pull_request: https://github.com/python/cpython/pull/14749 ___ Python tracker ___ _

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread Sviatoslav Sydorenko
Sviatoslav Sydorenko added the comment: Hi, I've tried clarifying this in docs as suggested @ https://github.com/python/cpython/pull/1163 -- ___ Python tracker ___ __

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Right. Which is why you get an error if you try to use an empty directory as if it was a maildir :) create=True creates the *directory* and initializes it. That seems clear to me, and exactly what I would expect. "The mailbox" is the directory. If it alr

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Sviatoslav Sydorenko
Sviatoslav Sydorenko added the comment: > create a Maildir folder in a temporary directory: > > with tempfile.TemporaryDirectory() as tmpdir: > with mailbox.Maildir(os.path.join(tmpdir, 'mail'), create=True) as > box: > ... Yeah, I came up with the same solution. It jus

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David. Rather than using a temporary directory as a Maildir folder: with tempfile.TemporaryDirectory() as tmpdir: with mailbox.Maildir(tmpdir, create=True) as box: ... create a Maildir folder in a temporary directory:

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Just create a subdirectory inside the tempdir to hold your Maildir folder. I think it is not worth complicating the API for this use case, since it does have a simple solution. -- versions: -Python 2.7, Python 3.5, Python 3.6 __

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I think this patch make the behavior changed. Documentation wrote that: "If create is True, the mailbox is created if it does not exist.", the current version did that exactly, it won't create subdir (tmp, new, and cur) when dir exists. The situation face here is t

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +email nosy: +barry, r.david.murray stage: -> patch review versions: -Python 3.3, Python 3.4 ___ Python tracker ___ ___

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Sviatoslav Sydorenko
New submission from Sviatoslav Sydorenko: Hi, I've faced an issue w/ `mailbox.Maildir()`. The case is following: 1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty 2. I pass that folder path as an argument when instantiating `mailbox.Maildir()` 3. Then I receive an exceptio