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

Comments

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Jan 22, 2018

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.

@alanbato
Copy link
Member

@alanbato alanbato commented Jan 24, 2018

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

@nicoddemus
Copy link
Member Author

@nicoddemus nicoddemus commented Jan 24, 2018

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

@brianmaissy brianmaissy commented Jan 25, 2018

Awesome idea! +1

@nicoddemus
Copy link
Member Author

@nicoddemus nicoddemus commented Jan 27, 2018

Fixed by #3150

@nicoddemus nicoddemus closed this Jan 27, 2018
@asottile
Copy link
Member

@asottile 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

@nicoddemus nicoddemus commented Feb 1, 2018

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.