Skip to content

bpo-32642: adding compatibility for pathlike objects in sys.path#5691

Closed
jayyyin wants to merge 6 commits into
python:masterfrom
jayyyin:systempathlike
Closed

bpo-32642: adding compatibility for pathlike objects in sys.path#5691
jayyyin wants to merge 6 commits into
python:masterfrom
jayyyin:systempathlike

Conversation

@jayyyin

@jayyyin jayyyin commented Feb 15, 2018

Copy link
Copy Markdown
Contributor

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

@jayyyin

jayyyin commented Mar 15, 2018

Copy link
Copy Markdown
Contributor Author

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...

@jayyyin

jayyyin commented Mar 15, 2018

Copy link
Copy Markdown
Contributor Author

https://pastebin.com/q4FKnPZH

the trace for the test_poplib

@csabella

csabella commented Apr 9, 2019

Copy link
Copy Markdown
Contributor

@jayyyin Please resolve the file conflict.

@csabella csabella requested a review from brettcannon April 9, 2019 23:21

@brettcannon brettcannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary as os.fspath() passes strings through without issue.

@@ -0,0 +1 @@
adding compatibility for pathlike objects in sys.path

@brettcannon brettcannon Apr 26, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
adding compatibility for pathlike objects in sys.path
Add compatibility for path-like objects on sys.path.
Patch by jayyin.

@bedevere-bot

Copy link
Copy Markdown

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@csabella

Copy link
Copy Markdown
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants