-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Reduce syscalls for posixpath.ismount
#117394
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
Related to #96328 |
Let |
Are you sure? >>> import ntpath
>>> ntpath.realpath(r"C:\Users\wanne\path-picker\link")
'C:\\Users\\wanne'
>>> ntpath.realpath(r"C:\Users\wanne\path-picker\link\..")
'C:\\Users\\wanne\\path-picker' Does that work the same on Linux? |
It works differently on Linux - |
It is now 2-3 times faster if the user has permissions.
#117447 is an alternate PR which achieves the same or better speed up. |
Actually, you can work around this: |
Currently this workaround is built in |
It is now 2-3 times faster if the user has permissions.
It is now 2-3 times faster if the user has permissions.
Feature or enhancement
Proposal:
Currently
posixpath.ismount
usesrealpath(join(path, '..'))
to get the parent of the mount. This is absolutely overkill and should only be used whenjoin(path, '..')
isn't sufficient.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
os.path
functions #117350Linked PRs
posixpath.ismount
#117395The text was updated successfully, but these errors were encountered: