-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 .gitignore
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 that all the time)... it does abbreviate to folder in git status when there are multiple untracked files in there, though |
|
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 with pytest-dev/pytest@4cd0322 or that Windows can't delete open files (i.e., if you're running with xdist.) |
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.x Backport PR #26578 on branch v3.8.x (MAINT: add __pycache__/ to .gitignore)
Folder isn't in .gitignore and our docs recommend
git commit -a
and I think this may be the cause of some really messy commit trees :/