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

Include the name "pytest" somewhere in the cache directory name #3138

Closed
nicoddemus opened this issue Jan 22, 2018 · 6 comments
Closed

Include the name "pytest" somewhere in the cache directory name #3138

nicoddemus opened this issue Jan 22, 2018 · 6 comments
Labels
good first issue easy issue that is friendly to new contributor plugin: cache related to the cache builtin plugin type: enhancement new feature or API change, should be merged into features branch

Comments

@nicoddemus
Copy link
Member

As commented by @nedbat on twitter:

I am unreasonably annoyed that pytest writes a JSON file to “.cache/v/cache/lastfailed”. Why no “pytest” in the directory? Why “cache” twice? What is “v”? Why no file extension?

People in that thread agreed with the sentiment.

@nicoddemus nicoddemus added type: enhancement new feature or API change, should be merged into features branch plugin: cache related to the cache builtin plugin good first issue easy issue that is friendly to new contributor labels Jan 22, 2018
@alanbato
Copy link
Member

Hey! I'll try to take this on if you don't mind :)

@nicoddemus
Copy link
Member Author

Awesome. I took a quick look at the code and keeping backward compatibility might be too tricky; if it proves itself too complicated don't mind about it, the cache is supposed to be data that might get lost eventually anyway.

@brianmaissy
Copy link
Contributor

Awesome idea! +1

@nicoddemus
Copy link
Member Author

Fixed by #3150

@asottile
Copy link
Member

asottile commented Feb 1, 2018

A bit unfortunate that I have to run around to every repository and s/\.cache/.pytest_cache/g in .gitignore due to this change.

I've at least automated this for repos I own using all-repos

I used the following command:

all-repos-sed 's/\.cache/.pytest_cache/g' .gitignore --commit-msg 'Change ignored cache dir for pytest 3.4.0'

@nicoddemus
Copy link
Member Author

Nice work on all-repos, I will be definitely giving it a go sometime soon. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor plugin: cache related to the cache builtin plugin type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

4 participants