Skip to content

Installing gitdb and gitdb2 simultaneously breaks gitdb package #908

Description

@arigesher

The change to requirements.txt in 2e7e82b specifies that both gitdb2 and gitdb be installed. As installation packages they share the same name and step on each other.

This breaks the use of the module like this:

Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gitdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'gitdb'

Activity

  1. arigesher commented on Aug 15, 2019

    @arigesher
    Author

    (This broke our CI/CD system is some difficult to figure out ways)

    Workaround: pin this package with: GitPython<3 in your requirements.txt

  2. added this to the v3.0.1 - Bugfixes milestone on Aug 15, 2019
  3. ghost closed this as completedin ca080bbon Aug 15, 2019
  4. Byron commented on Aug 15, 2019

    @Byron
    Member

    Thanks so much for pointing this out! I have just removed that line, hoping that this will fix the issue. Maybe you can provide the complete line that would pin gitdb to GitPython < 3, maybe that's better.

  5. arigesher commented on Aug 15, 2019

    @arigesher
    Author

    The provided line will pin the GitPython package to a version less than 3.0.0:

    GitPython<3
    

    That's a valid requirements.txt entry.

  6. Byron commented on Aug 15, 2019

    @Byron
    Member

    Thank you. Excuse my ignorance, I don't understand how a line like this would fit into the requirements.txt file of GitPython itself. Isn't that self-referential? I thought there is a way to constrain requirements to certain conditions, like: use gitdb only if GitPython's version is smaller than 3.

    In any case, looking at the fix I made in ca080bb, do you think this will work for you?

  7. arigesher commented on Aug 15, 2019

    @arigesher
    Author

    Yes, that totally fixed it.

  8. added a commit that references this issue on Sep 3, 2019
  9. Harmon758 commented on Oct 17, 2019

    @Harmon758
    Member

    @Byron Changes to requirements.txt are not retroactive, so prior releases keep the same dependencies. Either way, I'm not sure why ddt and gitdb were added back in 2e7e82b.

  10. Byron commented on Oct 18, 2019

    @Byron
    Member

    @Harmon758 If I remember correctly, these two requirements broke someones build in strange ways. I am not knowledgable enough though if it ultimately was a problem with GitPython.
    If you see issues with the current state of requirements.txt, I welcome a PR to fix it. Right now it seems quite minimal.

  11. added a commit that references this issue on Dec 17, 2019
  12. added a commit that references this issue on Apr 28, 2025
    ca080bb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions