-
Notifications
You must be signed in to change notification settings - Fork 56
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
missing_ok kwarg for unlink diverges from pathlib defaults #231
Comments
Current default is more network efficient, so if this is changed to default from pathlib then documentation should have some warning information about this inefficiency. I don't like pathlib default in this case, for me it seems unpythonic, but still its probably better choice to not diverge from pathlib. |
I'm generally in favor of matching pathlib's default. Regarding efficiency, I think that would depend on the particular backend implementation. I don't see any extra network calls in the case that cloudpathlib/cloudpathlib/s3/s3client.py Lines 303 to 334 in 2a3d712
cloudpathlib/cloudpathlib/azure/azblobclient.py Lines 232 to 249 in 2a3d712
cloudpathlib/cloudpathlib/gs/gsclient.py Lines 231 to 246 in 2a3d712
|
For the
unlink
function,missing_ok=True
by default. The default inpathlib
ismissing_ok=False
.This has always been the behavior, but as of #230 it is made explicit.
If we want to follow
pathlib
, we'll need a deprecation cycle to warn folks.Original context below.
Yeah, I'm on the fence about this diverging from
pathlib
defaults. IMO this is the nicer default, but in general we use pathlib as a pretty strict guide. @jayqi any thoughts here?I guess if we want to follow
pathlib
defaults here at some point we need to go through a deprecation warning cycle first.Originally posted by @pjbull in #230 (comment)
The text was updated successfully, but these errors were encountered: