-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) #805
Conversation
when the OS gives priority to errors such as EACCES over EEXIST.
@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @brettcannon, @zooba and @warsaw to be potential reviewers. |
@@ -1222,23 +1222,18 @@ def touch(self, mode=0o666, exist_ok=True): | |||
def mkdir(self, mode=0o777, parents=False, exist_ok=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you quickly add a docstring? Maybe "Create a new directory at this given path."?
A more thorough one is probably even better explaining the parameters, but the one-liner is better than nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…python#805) when the OS gives priority to errors such as EACCES over EEXIST. (cherry picked from commit af7b9ec)
…python#805) when the OS gives priority to errors such as EACCES over EEXIST. (cherry picked from commit af7b9ec)
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
when the OS gives priority to errors such as EACCES over EEXIST.