Skip to content

Ignore .pytest_cache/. #16595

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

Merged
merged 1 commit into from
Nov 15, 2019
Merged

Conversation

brandtbucher
Copy link
Member

Keeps my plugin from sneaking JSON files into commits.

@brandtbucher
Copy link
Member Author

Not sure how/if this should be backported.

@ammaraskar
Copy link
Member

Sorry if I'm missing something but which plugin are you referring to? Was it added to the workflow recently?

AFAIK we don't use or endorse pytest in cpython development.

@brandtbucher
Copy link
Member Author

@ammaraskar The Python plugin for Visual Studio Code generates these caches when the project is opened. I figured that since caches for other “unofficial” tools like .mypy_cache/ and .vscode/ are included here, it could be good to add.

Not a huge deal, but could be helpful to others.

@ammaraskar
Copy link
Member

Sounds good 👍

Maybe group up the vscode related ones and put a comment there just so people know why?

@brandtbucher
Copy link
Member Author

Well, this is a pytest cache, not a VSCode cache. The plugin just happens to trigger it (.mypy_cache/ is the same).

@taleinat
Copy link
Contributor

The Python plugin creates .pytest_cache directories for projects not using pytest? Sounds like a bug in the plugin! (And if it's this plugin that caused the addition of .mypy_cache to our .gitignore, maybe that should be fixed too...)

@merwok
Copy link
Member

merwok commented Nov 14, 2019

mypy cache is an older manual addition: #6614

Is is possible to run (some) CPython tests with pytest? If not, an IDE plugin dumping things to all your projects uncontrollably does not seem good.

@brandtbucher
Copy link
Member Author

It is possible. In fact, I've used pytest in the past to get nice iterative output, with something like pytest Lib/test/test_glob.py --looponfail.

Again, this is just a suggestion. I can always add it to my personal ignore file, but I figured if it was useful for me, it might be useful for others!

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at our .gitignore, it's obvious the current policy is to add everything that is common enough to be useful to many people. So if someone wants this, and there's surely no possible harm, I don't see why not :)

@taleinat
Copy link
Contributor

Not sure how/if this should be backported.

Since the vast majority of development is done based on the master branch, I don't think it is worth backporting this.

@taleinat taleinat merged commit 57d3ab8 into python:master Nov 15, 2019
@brandtbucher
Copy link
Member Author

Thanks @taleinat!

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
@brandtbucher brandtbucher deleted the ignore-pytest-cache branch July 21, 2022 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants