-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add follow_symlinks argument to ArtifactoryPath.is_dir #440
Add follow_symlinks argument to ArtifactoryPath.is_dir #440
Conversation
artifactory.py
Outdated
if follow_symlinks: | ||
raise TypeError('Artifactory does not have symlink feature') |
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.
Just ignore the flag IMO.
if follow_symlinks: | |
raise TypeError('Artifactory does not have symlink feature') |
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.
Thanks for your review.
The is_dir
will also be exposed to real user. The follow_symlinks
is follow the same way how Pathlib does, but it's just a placeholder, and not supported in Artifactory. It may be confused if the end user pass follow_symlinks=True
.
The Zen of Python
Errors should never pass silently.
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.
Passing follow_symlinks=True
means "if you encounter a symlink, follow it". That's not an error, even if the filesystem has no symlinks or doesn't support symlinks.
ecce73b
to
e4aaf76
Compare
I understand your point. To avoid any misunderstanding, please allow me to leave more detailed information here. follow_symlinksPython <= 3.11.3, there is no Python > 3.11.3, Let's see In Python 3.11.4-3.11.7, the In Python 3.12.0-3.12.2, the In Python latest(2/8/2024) main branch, pathlib is removed, pathlib._abc is introduced, and is_dirIn pathlib, it is As the default value of In Artifactory, we use the same In In Please correct me if I say anything wrong |
That seems broadly correct.
I'll change the default value to
|
#432 (comment)