bpo-32642: adding compatibility for pathlike objects in sys.path#5691
bpo-32642: adding compatibility for pathlike objects in sys.path#5691jayyyin wants to merge 6 commits into
Conversation
|
I'm having issues with my local changes for this PR, I'm unsure why my local machine takes a seemingly infinite amount of time on test_poplib, so again I think something to do with my local environment is causing issues again, any help would be appreciated... |
|
the trace for the test_poplib |
|
@jayyyin Please resolve the file conflict. |
brettcannon
left a comment
There was a problem hiding this comment.
Thanks for the PR but this needs tests.
| # the list of paths that will become its __path__ | ||
| namespace_path = [] | ||
| for entry in path: | ||
| if hasattr(entry, '__fspath__'): |
There was a problem hiding this comment.
This is unnecessary as os.fspath() passes strings through without issue.
| @@ -0,0 +1 @@ | |||
| adding compatibility for pathlike objects in sys.path | |||
There was a problem hiding this comment.
| adding compatibility for pathlike objects in sys.path | |
| Add compatibility for path-like objects on sys.path. | |
| Patch by jayyin. |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
The original author of the pull request hasn't been active on this issue for a long time, so I'm going to close it. This can be reopened or a new pull request can be created for work to continue on the issue. Thanks! |
I'm uncertain if that's all that needs to be done for the code to do what is intended since I'm kind of new to the whole path-like object concept, I've noticed that there's still self.path in the class and recall reading something about removing path attributes from classes, but I've been unable to find documentation on how to add compatibility to something for path-like objects.
https://bugs.python.org/issue32642