GeezerVison is showing github.com — Installing gitdb and gitdb2 simultaneously breaks gitdb package · Issue #908 · gitpython-developers/GitPython
Installing gitdb and gitdb2 simultaneously breaks gitdb package #908DescriptionThe 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'
Activityarigesher commented on Aug 15, 2019 (This broke our CI/CD system is some difficult to figure out ways)
Workaround: pin this package with: GitPython<3 in your requirements.txt Byron commented on Aug 15, 2019 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. arigesher commented on Aug 15, 2019 The provided line will pin the GitPython package to a version less than 3.0.0:
That's a valid requirements.txt entry. Byron commented on Aug 15, 2019 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? arigesher commented on Aug 15, 2019 Yes, that totally fixed it. Harmon758 commented on Oct 17, 2019 @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. Byron commented on Oct 18, 2019 @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. added a commit that references this issue on Apr 28, 2025This issue will close once commit ca080bb is merged into the 'master' branch.ca080bb
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|