We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Similarly to how several pathlib file creation functions have an "exists_ok" parameter, we should introduce "missing_ok" that makes removal functions not raise an exception when a file or directory is already absent. IMHO, this should cover Path.unlink and Path.rmdir. Note, Path.resolve() has a "strict" parameter since 3.6 that does the same thing. Naming this of this new parameter tries to be consistent with the "exists_ok" parameter as that is more explicit about what it does (as opposed to "strict").
https://bugs.python.org/issue33123
Sorry, something went wrong.
Hello, and thanks for your contribution!
I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).
Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.
Thanks again to your contribution and we look forward to looking at it!
2e2506a
6d6f2e9
CLA is signed and submitted.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth changing the name of the file to something sort of explicit such as fileMissing. I'd rather not surprise the reader and use what seems the default in the tests file ie. fileA here too.
fileMissing
fileA
WDYT?
Agreed. fileA actually exists, but I changed to fileAAA which seems to be used for a non-existing file in other tests.
fileAAA
68d5edb
pathlib: Add missing_ok parameter to Path.unlink
4277aab
Fixes bpo-33123
Fix markup in NEWS file
c7ce026
A simple enough addition. LGTM.
@rbu: Status check is done, and it's a success ✅ .
d9e006b
Thank you, @pitrou, for the review.
pitrou pitrou approved these changes
amirouche amirouche left review comments
Successfully merging this pull request may close these issues.