Skip to content

.pytest_cache is showing up in projects git repos #3286

Description

@RonnyPfannschmidt

i just noted that this started to happen, as far as i can tell the .cache rename was a breaking change for users

Activity

  1. added
    status: criticalgrave problem or usability issue that affects lots of users
    type: regressionindicates a problem that was introduced in a release which was working previously
    on Mar 6, 2018
  2. The-Compiler commented on Mar 6, 2018

    @The-Compiler
    Member

    Not sure how this would be actionable for pytest?

  3. RonnyPfannschmidt commented on Mar 6, 2018

    @RonnyPfannschmidt
    MemberAuthor

    its not clear to me either, but i started to note that people are affected by our change in a negative unintended way

  4. nicoddemus commented on Mar 6, 2018

    @nicoddemus
    Member

    People probably made the same mistake when we introduced pytest-cache into the core and hence .cache started to be created every time pytest executed.

  5. nicoddemus commented on Mar 6, 2018

    @nicoddemus
    Member

    I see that .pytest_cache already made into GitHub's default .gitignore file in github/gitignore@f651f0d, which is good.

  6. RonnyPfannschmidt commented on Mar 7, 2018

    @RonnyPfannschmidt
    MemberAuthor

    @nicoddemus that doesnt help people updating their projects however

  7. nicoddemus commented on Mar 7, 2018

    @nicoddemus
    Member

    Indeed it does not, just thought I would mention that.

    One thing that might help is to add a .pytest_cache/README file which explains what is the purpose of the directory and that it should not be added to version control. Of course few people will actually read that file, but other than that I'm out of ideas on how to improve the situation.

    TBH I don't consider this critical, certainly a nuisance but not critical.

  8. 18 remaining items

  9. nicoddemus commented on Sep 14, 2018

    @nicoddemus
    Member

    We use Mercurial for example, so adding .gitignore would not really work in our case

    Good point, we should also add Mercurial and other systems (Bazaar, ?)

  10. nicoddemus commented on Sep 14, 2018

    @nicoddemus
    Member

    Does anybody see any drawback with having a .gitignore (and etc) with mask * in there? Seems like the perfect solution, solves the problem and trivial to implement.

  11. RonnyPfannschmidt commented on Sep 14, 2018

    @RonnyPfannschmidt
    MemberAuthor

    git is the de facto winner of the scm wars due to the network effects - so lets add it, and be open for users of other systems to add support for their scm's

  12. nicoddemus commented on Sep 14, 2018

    @nicoddemus
    Member

    Hmm I agree. When I suggested to support other systems, I was under the impression that the most popular ones work similarly to .gitignore, as I have seen .hgignore multiple times. But reading the documentation I found you can only have a single .hgignore next to .hg, so this greatly complicates things. Same with Bazaar.

    It is very hard to solve this issue for every SCM (except changing the location of .pytest_cache as depicted in #1089), so better to fix this with a simple solution for Git users rather than not solve this for everyone and linger this forever.

    We can always change the solution later if we find a better way, after all.

  13. added a commit that references this issue on Sep 24, 2018
  14. added 2 commits that reference this issue on Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: cacherelated to the cache builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions