python / python/mypy

mypy default cache is not using XDG specification

Open
#8,790 6 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

mypy should follow the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html specification for its default location of the cache directory, this means that its cache should be located somewhere under $XDG_CACHE_HOME or ~/.cache when environment variable is not defined.

The reasons for this is mostly about de-cluttering repositories, keeping cache files in a single location, making it easy to cleanup by the operating system.

Lots of tools adopted this specification even when have nothing to so with XDG itself, as it is portable and sets good practices.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating mypy's cache-directory configuration and compare its current default with the linked XDG Base Directory specification. Verify the behavior with and without XDG_CACHE_HOME; done means the cache is placed under that variable or under ~/.cache when it is unset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.