-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
allow users to set cache_directory via env-var #1965
Comments
Why? |
because libraries installed in a virtualenv should not write to hardcoded externals dirs like ~/.cache/jedi. and setting XDG_CACHE_HOME to some project-specific dir only creates other issues. |
and because I want to avoid monkeypatching :) |
But this does not explain when you would use this? |
I never use jedi directly but subdependencies in many of my projects are. The whole idea of virtualenvs is to provide a certain isolation from the rest of the system and the ability to run many versions in parallel. Writing to $HOME runs counter to that. |
I'm not understanding your question. So when would I use this JEDI_CACHE_DIR? In every project that depends on jedi. |
But how do you set this? Do you really set this variable by hand in every venv? |
I set env-vars in a .env and pip install autoread-dotenv to automatically process the .env. see https://autoread-dotenv.readthedocs.io/ ( I wrote this package) examples: |
Sorry, this feels not important enough for me. I'm closing. |
jedi is mostly installed in a virtualenv, but uses $XDG's ~/.cache/jedi , which is a good default / fallback.
Many python tools/libs allow the user to set the cache_dir via env-var:
BLACK_CACHE_DIR
MYPY_CACHE_DIR
RUFF_CACHE_DIR
....
please support an env-var JEDI_CACHE_DIR
The text was updated successfully, but these errors were encountered: