Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
timhoffm merged 1 commit intomatplotlib:mainfromstory645:git-ignore
Aug 23, 2023

Conversation

@story645
Copy link
Member

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

@ksunden
Copy link
Member

Unclear to me why this would be needed, git tracks files, not folders, and all of the files that get put in__pycache__ folders should be excluded by the*.py[ocd] rule on line 27

If we do include__pycache__ as an explicit exclude, I don't think it should be scoped tolib/matplotlib/tests

Do you have an example of a file that gets placed in__pycache__ that is not already excluded? If there is something new in there, I think we should excludethat rather than__pycache__

@story645story645 changed the titleMAINT: addedlib/matplotlib/tests/__pycache__/ to .gitignoreMAINT: add __pycache__/ to .gitignoreAug 23, 2023
@story645
Copy link
MemberAuthor

Mostly wanted it cause this threw me for a loop:
image

None of the files in there get committed, but it's a bit confusing. Changed to the general form.

@ksunden
Copy link
Member

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
Copy link
MemberAuthor

What are the contents of that folder?

.pyc files andWindowsPath('lib/matplotlib/tests/__pycache__/test_axes.cpython-311-pytest-7.4.0.pyc.10632')

@QuLogic
Copy link
Member

QuLogic commentedAug 23, 2023
edited
Loading

.pyc files andWindowsPath('lib/matplotlib/tests/__pycache__/test_axes.cpython-311-pytest-7.4.0.pyc.10632')

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
Copy link
Member

timhoffm commentedAug 23, 2023
edited
Loading

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.

story645 reacted with thumbs up emoji

@timhoffmtimhoffm added this to thev3.8.0 milestoneAug 23, 2023
@timhoffmtimhoffm merged commit43bc6b5 intomatplotlib:mainAug 23, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 23, 2023
@story645story645 deleted the git-ignore branchAugust 23, 2023 20:57
QuLogic added a commit that referenced this pull requestAug 23, 2023
…578-on-v3.8.xBackport PR#26578 on branch v3.8.x (MAINT: add __pycache__/ to .gitignore)
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ksundenksundenksunden approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

v3.8.0

Development

Successfully merging this pull request may close these issues.

4 participants

@story645@ksunden@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp