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

Caching: Use a more respectful default location? #342

Closed
woodruffw opened this issue Jul 29, 2022 · 1 comment · Fixed by #814
Closed

Caching: Use a more respectful default location? #342

woodruffw opened this issue Jul 29, 2022 · 1 comment · Fixed by #814
Labels
good first issue Good for newcomers help wanted Extra attention is needed pri:low low(er) priority tasks

Comments

@woodruffw
Copy link
Member

woodruffw commented Jul 29, 2022

At the moment, we fall back to ~/.pip-audit/cache if pip cache dir fails. This isn't a "respectful" default, since it doesn't adhere to either XDG (which probably wants us to consult XDG_CACHE_HOME) or macOS's conventions (~/Library/Caches, probably).

This probably isn't the most important change to make since 99% of users won't notice it anyways, but it would make us a slightly better participant in the user's home directory.

@woodruffw woodruffw added the pri:low low(er) priority tasks label Jul 29, 2022
@woodruffw woodruffw added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 5, 2023
aanghelidi added a commit to aanghelidi/pip-audit that referenced this issue Aug 17, 2024
This commit implements cache's location as described in pypa#342.
It default to the XDG Base Directory Specification excepts on
macOS where it is located at `$HOME/Library/Caches/pip-audit`.

Closes pypa#342
aanghelidi added a commit to aanghelidi/pip-audit that referenced this issue Aug 18, 2024
On Windows, although not "officially" a convention, it appears
that programs like `pip` use %LocalAppData%\<program_name>\Cache.
This commit implements that default.
See https://pip.pypa.io/en/latest/topics/caching/#default-paths.

Closes pypa#342.
@aanghelidi
Copy link
Contributor

Hello @woodruffw, I made a PR that solves this issue. It is ready for a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed pri:low low(er) priority tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants