[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-11-23 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improper NotADirectoryError when opening a file in a fake directory ___ Python tracker

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Hong Xu
Hong Xu added the comment: Should we update the document at least? The document doesn't mention NotADirectoryError or its super classes at all. -- ___ Python tracker ___

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Irit Katriel
Irit Katriel added the comment: See also issue41737. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Eryk Sun
Eryk Sun added the comment: NT filesystems are specified to fail with STATUS_OBJECT_PATH_NOT_FOUND (0xC03A) if a parent component in a path either does not exist or is not a directory. In the Windows API, this translates to ERROR_PATH_NOT_FOUND (3), which in the C runtime translates to

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, some operations can raise instances of different OSError subclasses on different platforms, because the corresponding C function sets different errno. It is so, and we cannot do anything with this. It is just a part of the difference between

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Hong Xu
Change by Hong Xu : -- title: Inconsistent exceptions thrown by mkdir on different OSes -> Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes ___ Python tracker