Skip to content
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

PYTHONPATH not handled as a list anymore #2125

Closed
languitar opened this issue Jun 5, 2015 · 7 comments
Closed

PYTHONPATH not handled as a list anymore #2125

languitar opened this issue Jun 5, 2015 · 7 comments

Comments

@languitar
Copy link

In older versions of fish, PYTHONPATH used to be a list. Since I upgraded to the latest master version this is not the case anymore:

jwienke@cinnabar ~> echo $PYTHONPATH
/homes/jwienke/local/trusty/x86_64/lib/python/site-packages:/homes/jwienke/local/trusty/x86_64/lib/python2.7/site-packages:/homes/jwienke/local/trusty/x86_64/lib/python2.7/dist-packages
jwienke@cinnabar ~> fish --version
fish, version 2.2b1-29-g18d746
@ridiculousfish
Copy link
Member

This is deliberate; see #1374. See #2022 for some ideas about what we can do.

@languitar
Copy link
Author

Ok, didn't find that issue.

How is PATH currently handled? Because there it still seems to be a list. Maybe a special rule for certain variables?

@ridiculousfish
Copy link
Member

Yes, we have a whitelist which is only PATH, MANPATH, and CDPATH.

@languitar
Copy link
Author

Can PYTHONPATH be added there? It follows the same semantics and doesn't allow URIs.

@ridiculousfish
Copy link
Member

We hope to never change the whitelist, to avoid different versions of fish behaving differently. However we may relax the rules for outgoing variables, so we won't split on colons on importing env vars but will add colons when exporting them. I think there's an issue tracking that idea somewhere. Edit: Found it, #1999. Are you OK closing as a dup of that?

@languitar
Copy link
Author

Sure. Thanks for the explanations.

@Hwesta
Copy link

Hwesta commented Oct 30, 2015

For the next person to run into this: I was having the problem where set -xg PYTHONPATH /python/path/1/ /python/path/2/ produced PYTHONPATH=/python/path/1//python/path/2/ which Python couldn't read properly. The workaround seems to be set -xg PYTHONPATH /python/path/1/:/python/path/2/ which allows Python to see a colon-delineated list, even though fish sees it as a string.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants