Created on 2015-12-05 03:48 by Daniel Lepage, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 805 | merged | serhiy.storchaka, 2017-03-24 17:19 | |
| PR 806 | merged | serhiy.storchaka, 2017-03-24 19:00 | |
| PR 807 | merged | serhiy.storchaka, 2017-03-24 19:15 | |
| Messages (7) | |||
|---|---|---|---|
| msg255916 - (view) | Author: Daniel Lepage (Daniel Lepage) | Date: 2015-12-05 03:48 | |
pathlib.Path('/').mkdir() raises an IsADirectoryError instead of a FileExistsError.
|
|||
| msg255956 - (view) | Author: Daniel Lepage (Daniel Lepage) | Date: 2015-12-05 14:39 | |
It looks like this is an OSX-specific behavior, and not a python problem: $ mkdir . mkdir: .: File exists $ mkdir / mkdir: /: Is a directory |
|||
| msg255958 - (view) | Author: Eryk Sun (eryksun) * | Date: 2015-12-05 14:46 | |
The mkdir method needs a fix similar to what was done for issue 25583. For example, currently on Windows the exist_ok option doesn't handle the PermissionError raised when [accidentally] trying to create the root directory: >>> pathlib.Path('C:/').mkdir(exist_ok=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\Python 3.5\lib\pathlib.py", line 1199, in mkdir self._accessor.mkdir(self, mode) File "C:\Program Files\Python 3.5\lib\pathlib.py", line 371, in wrapped return strfunc(str(pathobj), *args) PermissionError: [WinError 5] Access is denied: 'C:\\' |
|||
| msg290100 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-03-24 17:21 | |
I can't test on Windows and OSX but I suppose PR 805 fixes both issues. |
|||
| msg290105 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-03-24 18:51 | |
New changeset af7b9ec5c855366feef4c67dc492d64b3baf84ca by Serhiy Storchaka in branch 'master': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) (#805) https://github.com/python/cpython/commit/af7b9ec5c855366feef4c67dc492d64b3baf84ca |
|||
| msg290112 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-03-24 19:46 | |
New changeset 8c8785b2f8e4048cef350f89c686266f4519b67c by Serhiy Storchaka in branch '3.6': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True)… (#806) https://github.com/python/cpython/commit/8c8785b2f8e4048cef350f89c686266f4519b67c |
|||
| msg290113 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-03-24 19:46 | |
New changeset 1fc1f8d7f737f80a1ee5ea37b9781c0a790102b2 by Serhiy Storchaka in branch '3.5': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) (#805) (#807) https://github.com/python/cpython/commit/1fc1f8d7f737f80a1ee5ea37b9781c0a790102b2 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:24 | admin | set | github: 69989 |
| 2017-03-24 19:50:35 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-03-24 19:46:48 | serhiy.storchaka | set | messages: + msg290113 |
| 2017-03-24 19:46:27 | serhiy.storchaka | set | messages: + msg290112 |
| 2017-03-24 19:15:33 | serhiy.storchaka | set | pull_requests: + pull_request712 |
| 2017-03-24 19:00:24 | serhiy.storchaka | set | pull_requests: + pull_request711 |
| 2017-03-24 18:51:55 | serhiy.storchaka | set | messages: + msg290105 |
| 2017-03-24 17:21:39 | serhiy.storchaka | set | versions:
+ Python 3.7 nosy: + serhiy.storchaka messages: + msg290100 assignee: serhiy.storchaka |
| 2017-03-24 17:19:53 | serhiy.storchaka | set | pull_requests: + pull_request710 |
| 2015-12-05 17:16:39 | eryksun | set | nosy:
+ pitrou versions: + Python 3.6 |
| 2015-12-05 14:46:51 | eryksun | set | nosy:
+ eryksun messages: + msg255958 |
| 2015-12-05 14:39:57 | Daniel Lepage | set | messages: + msg255956 |
| 2015-12-05 03:48:12 | Daniel Lepage | create | |