Skip to content
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

GitPython not available for Python 2.7 #897

Closed
lbussy opened this issue Jul 21, 2019 · 7 comments
Closed

GitPython not available for Python 2.7 #897

lbussy opened this issue Jul 21, 2019 · 7 comments

Comments

@lbussy
Copy link

lbussy commented Jul 21, 2019

Also posted on Stack Overflow in case this is just me.

When I try to install gitpython via pip normally under python 2.7, it fails telling me python 3.x is required.

This particular script/process has worked until this morning. Potential sources of the change (in my case) are an upgrade to Debian Buster (Raspbian in this case.)

 $ sudo pip install gitpython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting gitpython
  Using cached https://www.piwheels.org/simple/gitpython/GitPython-2.1.12-py2.py3-none-any.whl
GitPython requires Python '>=3.0, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' but the running Python is 2.7.16

I am running Python 2.7.16

$ python --version
Python 2.7.16

When I check the current documentation I see that Python 2.7 or newer is listed as a requirement. What am I missing?

@stsewd
Copy link
Contributor

stsewd commented Jul 21, 2019

Python 2.7 support was droppen in dac619e, the documentation should be updated

@lbussy
Copy link
Author

lbussy commented Jul 21, 2019

Well, shoot. I guess I had all that free time I was wondering what I could do with ... :)

Thanks for the reply.

@lbussy lbussy closed this as completed Jul 21, 2019
@lbussy lbussy changed the title GitPython not available forPython 2.7 GitPython not available for Python 2.7 Jul 22, 2019
@Byron
Copy link
Member

Byron commented Aug 11, 2019

Just for completeness: Removing python 2 support was a mistake, which was fixed soon after. Thus the GitPython 2.X line will indefinitely support python 2.
However, right now development has moved to dropping python2 support, and GitPython 3.X will commit to that change.

@dbainbridge
Copy link

There is now a dependency that requires python3 even with the 2.X line:
gitdb2 requires Python '>=3.4' but the running Python is 2.7.16

@Harmon758
Copy link
Member

Unfortunately, there was improper formatting for the version specifier for gitdb2 in requirements.txt.
This was fixed with 2573dd5 in v3.0.7, but has not been backported to v2.

Even with the version specifier, the version of GitDB was not restricted to < or <= any certain version.
This means that v2 will install the latest version of GitDB, which has recently dropped support for Python 2.7 with gitpython-developers/gitdb@c880f6b and gitpython-developers/gitdb@df73d7f.

For now, you can revert back to gitdb2 2.0.6.

@Harmon758
Copy link
Member

I've backported 2573dd5 to the py2 branch with 7539cd8 and version locked gitdb2 to <3 with bcf9f1c now. I've also tagged the fix as v2.1.15. You can now also install directly from the branch or tag, until v2.1.15 is released on PyPI.

@Byron https://github.com/gitpython-developers/GitPython/releases/tag/2.1.15 / 09ac0a1 needs to be released as v2.1.15 on PyPI. The Travis CI build failure we discussed in #979 reoccurred, but looking into it now, it seems to be an issue specific to the number of reference types for the tag build. The build for the commit itself passed with no issue.

@Byron
Copy link
Member

Byron commented Feb 17, 2020

@Harmon758 Thanks so much for laying it down so nicely! Version 2.1.15 was just released to pypi, which should fix this issue @dbainbridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants