-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Unclear documentation for shutil.copytree() #88513
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
Comments
I donot understand this sentence: "dirs_exist_ok dictates whether to raise an exception in case dst or any How can a "missing parent directory already exist"? My understanding would be that an existing Until 3.7, missing parent directories were documented to be auto-created ( What am I missing? I think, the documentation should be amended to make that clear. |
From the code, this arg is simply passed to os.mkdirs() here: Line 450 in e6e34e4
os.mkdir is documented here: https://docs.python.org/3/library/os.html#os.makedirs and says just "If exist_ok is False (the default), an FileExistsError is raised if the target directory already exists." So I agree that the sentence you highlighted can be improved. Would you like to submit a patch? |
I would like to submit a patch for this. This would be my first contribution :) I am starting on a patch now. |
I've created a PR: #26634 I forgot to put a news entry, but hopefully that's ok since this is a very small change. |
* add a paragraph to document this kwarg in detail * update docstring in the source accordingly
…-91434) * add a paragraph to document this kwarg in detail * update docstring in the source accordingly (cherry picked from commit f33e2c8) Co-authored-by: Jack DeVries <[email protected]>
#91434 was merged to address this. Thanks for your contribution @jdevries3133! I'll close this issue once the backports (#91464, #91465) are merged. |
…91465) * add a paragraph to document this kwarg in detail * update docstring in the source accordingly (cherry picked from commit f33e2c8) Co-authored-by: Jack DeVries <[email protected]>
…91464) * add a paragraph to document this kwarg in detail * update docstring in the source accordingly (cherry picked from commit f33e2c8) Co-authored-by: Jelle Zijlstra <[email protected]>
…-91434) (pythonGH-91465) * add a paragraph to document this kwarg in detail * update docstring in the source accordingly (cherry picked from commit f33e2c8) Co-authored-by: Jack DeVries <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: