-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Update os.path for PEP 519/__fspath__() #71711
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
As per PEP-519, os.path needs to be updated to support __fspath__(). |
Here are tests for genericpath, posixpath, and ntpath (which should in the end cover all of os.path). |
Ran into the first nasty snag: people are abusing os.path.commonprefix() and it's extremely generic approach. Instead of passing in a list of file paths they are passing a list of lists of file path *parts*, e.g. instead of ["a/b", "a/c"] they are passing in [["a", "b"], ["a", "c"]]. I have special-cased when the list contains another list or tuple, but I still feel dirty doing it. |
Here is a patch that includes the previous tests as long with fixes which don't involve stat or lstat (once those functions are updated themselves then os.path will be ported). |
New changeset b64f83d6ff24 by Brett Cannon in branch 'default': |
New changeset 9be0286772bf by Brett Cannon in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: