bpo-44347: [doc] clarify meaning of shutil.copytree's dirs_exist_ok kwarg#26643
bpo-44347: [doc] clarify meaning of shutil.copytree's dirs_exist_ok kwarg#26643jdevries3133 wants to merge 70 commits intopython:mainfrom
Conversation
…kwarg * It now mirrors the documentation for os.makedirs * Docstring in python source file was correspondingly updated
* Add additional clarification: nonexistent parent directories will also be created.
|
@tvogel, continuing our conversation from now-closed #26634... I agree, that should be mentioned and I added more detail for that. Additionally, I moved everything about Key Sentence Added
|
nanjekyejoannah
left a comment
There was a problem hiding this comment.
Thanks for your contribution @jdevries3133, can you please fix the errors reported in the CI?
|
@nanjekyejoannah I fixed it. Thank you for your patience! |
| that supports the same signature (like :func:`~shutil.copy`) can be used. | ||
|
|
||
| If *dirs_exist_ok* is false (the default), a :exc:`FileExistsError` is | ||
| raised if *dst* already exists. Conversely, *dst* as well as any any parent |
There was a problem hiding this comment.
I think this phrasing is a bit unclear. 'conversely' implies that the following is opposite to how the default value works. In other words, I would read this sentence as saying that with dirs_exist_ok=False, dirs along the path to dst, as well as dst itself, will not be created.
There was a problem hiding this comment.
Yeah, you are totally correct; I've made it more confusing. I changed it to be much more explicit.
|
I think the failing test is related to bpo-38323. I only made changes to docs / docstrings, and |
In particular, when running with tk8.6.8, as in PSF 3.9. Co-authored-by: Terry Jan Reedy <[email protected]>
…-26606) Change the behaviour of `math.pow(0.0, -math.inf)` and `math.pow(-0.0, -math.inf)` to return positive infinity instead of raising `ValueError`. This makes `math.pow` consistent with the built-in `pow` (and the `**` operator) for this particular special case, and brings the `math.pow` special-case handling into compliance with IEEE 754.
Greatly reduce pow() overhead for small exponents.
…er buffers (pythonGH-26676) Automerge-Triggered-By: GH:pablogsal
Co-authored-by: Terry Jan Reedy <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
…results (pythonGH-26715) * Simplify the count_vowels example * Hits and misses are fetched while a lock is held * Add note that references are kept for arguments and return values * Clarify behavior when *typed* is false.
…-26638) * Add specializations of LOAD_GLOBAL. * Add more stats. * Remove old opcache; it is no longer used. * Add NEWS
|
@akulakov Ah, I see what you are saying; however, I'm still happy with what I added because:
All that being said, I did add one sentence about the relationship between dirs_exist_ok and os.makedirs's exist_ok parameters. |
|
This PR is stale because it has been open for 30 days with no activity. |
* remove the note which is excessive * remove all changes to `Lib/shutil.py`, pending approval of the new docs, I'll re-add revisions to shutil.copytree's docstring. * revise first paragraph
|
@JelleZijlstra I revised the PR. If it looks good, I will add the paragraph about dirs_exist_ok to the docstring in I deleted 80% of the PR and rewrote the rest, so please review as if this is all new. |
JelleZijlstra
left a comment
There was a problem hiding this comment.
The text looks good! Can you update the docstring too and undraft the PR?
|
@JelleZijlstra OK, good to go. Not sure why the CLA bot is complaining, I clicked the link and re-signed but it still says I'm unsigned. I'm guessing it's just a GitHub migration glitch, I've made a handful of contributions in the past and did sign the CLA. |
|
CI failure is a fluke: Can you trigger a re-run? |
Probably related to python/the-knights-who-say-ni#318 |
|
I wonder if the CLA bot is unhappy because of all the random commits that were added to the branch earlier. |
Perhaps a force-push would sort that out? |
|
I just created a new branch and a new PR with a single commit: Use it if that's helpful, close it if not :) |
|
Merged in #91434. |
https://bugs.python.org/issue44347
https://bugs.python.org/issue44347