Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
MAINT: add __pycache__/ to .gitignore#26578
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ksunden commentedAug 23, 2023
Unclear to me why this would be needed, git tracks files, not folders, and all of the files that get put in If we do include Do you have an example of a file that gets placed in |
lib/matplotlib/tests/__pycache__/ to .gitignorestory645 commentedAug 23, 2023
ksunden commentedAug 23, 2023
What are the contents of that folder? usually its all .pyc files, and I'm pretty sure git usually will not show that if that is the case (if it did, it would show thatall the time)... it does abbreviate to folder in git status when there are multiple untracked files in there, though |
story645 commentedAug 23, 2023
|
QuLogic commentedAug 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I can confirm some of these files existing on Windows, though only for pytest 7.4.0. There is also a pytest 7.3.2 file but without the pid at the end. It looks like they write that and replace the pid-less filename. I'm not sure why that never seems to be a problem on Linux. Perhaps something to do withpytest-dev/pytest@4cd0322 or that Windows can't delete open files (i.e., if you're running with xdist.) |
timhoffm commentedAug 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I don’t see any reason to not ignore this folder, explicitly. By construction we don’t want this in the repository. And if, for some reason, there will be other file types in the future it’s better to explicitly ignore the folder, rather than relying on ignoring its content. |
…578-on-v3.8.xBackport PR#26578 on branch v3.8.x (MAINT: add __pycache__/ to .gitignore)

Folder isn't in .gitignore and our docs recommend
git commit -aand I think this may be the cause of some really messy commit trees :/