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

python.path in ~/.pdm/config.toml appears to never be used #842

Closed
dlukes opened this issue Jan 4, 2022 · 0 comments · Fixed by #845
Closed

python.path in ~/.pdm/config.toml appears to never be used #842

dlukes opened this issue Jan 4, 2022 · 0 comments · Fixed by #845
Labels
⭐ enhancement Improvements for existing features

Comments

@dlukes
Copy link

dlukes commented Jan 4, 2022

Is your feature request related to a problem? Please describe.

I was trying to set a Python version for PDM to prioritize instead of the default sorting algorithm. I thought pdm config python.path /path/to/python looked promising, but it didn't work.

On closer inspection, it looks like python.path in ~/.pdm/config.toml will never be used for anything, because:

  • local project settings always override global ones
  • when there's no local (project-specific) .pdm.toml, it gets created first and always contains at least python.path

Being able to set a value that's never used for anything is confusing for users.

Describe the solution you'd like

I can see different solutions:

  1. Add a caveat to the docs, saying that while python.path can be set in the global config, it has no effect.
  2. Print a warning saying the same thing when setting python.path in the global config.
  3. Implement the behavior I originally expected: when python.path exists in ~/.pdm/config.toml, bump it to the first place in the list of Python suggestions.
@dlukes dlukes added the ⭐ enhancement Improvements for existing features label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant