Error installing GitPython==2.1.14
I can't install GitPython==2.1.14 anymore, and I think it has to do with the release of gitdb that has been done yesterday. Is there something wrong in the dependencies?
This is how you can replicate this error in a docker container:
docker run -it ubuntu
apt update && apt install python-pip -y
pip install -U GitPython==2.1.14
Output:
Collecting GitPython==2.1.14
Downloading https://files.pythonhosted.org/packages/2e/93/c26103b14766b83d6c2f7d2a29aa8540058c2970f2c80b13c25720764b70/GitPython-2.1.14-py2.py3-none-any.whl (452kB)
100% |################################| 460kB 1.9MB/s
Collecting gitdb2>=2.0.0 (from GitPython==2.1.14)
Downloading https://files.pythonhosted.org/packages/97/97/6ad081c9f3efa1545fd11149f14602a53e2003c153312c8bfa825ba27b89/gitdb2-4.0.2.tar.gz
Collecting gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14)
Could not find a version that satisfies the requirement gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14) (from versions: 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4)
No matching distribution found for gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.14)
Ran into the same thing. This appears to be a python 2.7 problem. Something about the recent update makes pip get confused trying to find a version of gitdb/gitdb2 that fulfills the requirements.
My current workaround is to pin gitdb2 to 2.0.6 (last version I could find that supports 2.7):
docker run -it ubuntu
apt update && apt install python-pip -y
pip install gitdb2==2.0.6
pip install GitPython==2.1.14
I also tried the same workaround.
Same for me and I added a fixed for that: https://github.com/gitpython-developers/gitdb/pull/60. There seem to be some differences between gitdb and gitdb2 packages.
gitdb2 was changed to mirror gitdb, so that we could transition back to using the gitdb package name (https://github.com/gitpython-developers/gitdb/issues/59). Since it's a mirror package, I didn't include a lot of the metadata, including that it requires Python >= 3.4, and I'd rather not have to add it specifically for Python 2 support (https://github.com/gitpython-developers/gitdb/pull/60#issuecomment-590225489, https://github.com/gitpython-developers/gitdb/pull/60#issuecomment-590393932).
However, the latest version of GitPython that supports Python 2, v2.1.15, should still work without any issues, as that version locks gitdb2 to < 3 (https://github.com/gitpython-developers/GitPython/commit/bcf9f1c5c63a9578b7f8108d6dbc69a80706e807). This was done and released as v2.1.15 when GitDB dropped Python 2 support (https://github.com/gitpython-developers/GitPython/issues/897#issuecomment-586740535) in v3.0.0.
Unfortunately, older versions of GitPython v2 did not have an upper bound for the gitdb2 requirement version specifier (https://github.com/gitpython-developers/GitPython/issues/897#issuecomment-586737457). If for some reason, you need to use an older version of GitPython, you can specify a version requirement of < 3 for gitdb2 yourself. I would recommend updating to GitPython v2.1.15 instead though.
I'm still considering #60, so let me know if you have a situation where you cannot upgrade GitPython to v2.1.15 or pin gitdb2 to < 3 yourself. See also https://github.com/gitpython-developers/gitdb/pull/60#issuecomment-590393932.
GitPython released 3.1.0 to fix this problem: https://github.com/gitpython-developers/GitPython/commit/c859019afaffc2aadbb1a1db942bc07302087c52
I still think GitDB should have the correct dependencies to prevent this problem. Now every upstream package has to fix this.
GitPython 3.1.0 was released to switch back to the gitdb package name now that gitdb2 is a mirror package. Again, see #59.
There's no issues with dependencies. The only upstream package is smmap and it's not affected by this.