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

Provide/document a way how to find out the current version of GitPython #311

Closed
ghost opened this issue Jul 10, 2015 · 5 comments · Fixed by #868
Closed

Provide/document a way how to find out the current version of GitPython #311

ghost opened this issue Jul 10, 2015 · 5 comments · Fixed by #868

Comments

@ghost
Copy link

ghost commented Jul 10, 2015

Because of the problem which I've described under 96c6ab4, I'd like to ask you to provide this information so that one can use the GitPython version to write a software which must be compatible with different GitPython versions.

@Byron Byron added this to the v1.0.2 - Fixes milestone Jul 14, 2015
@Byron
Copy link
Member

Byron commented Jul 14, 2015

If GitPython was installed from Pypi, you can access version information like so:

import git
git.__version__

If a version from GitHub is used, the said variable will hold the value git though, which would make it hard to make a decision unless one would be willing to assume it is the very latest dev version.

Do you find this information helpful ?

@ghost
Copy link
Author

ghost commented Jul 14, 2015

If you document that there is this variable and how to parse it so that on can test whether the current GitPython version is greater that given version, I'd be perfectly satisfied :-)

@PonteIneptique
Copy link
Contributor

Sorry to join without being invited, but wouldn't if be possible with normal tools such as :

from distutils.version import LooseVersion, StrictVersion
LooseVersion("2.3.1") < LooseVersion("10.1.2")
StrictVersion("2.3.1") < StrictVersion("10.1.2")

http://stackoverflow.com/questions/11887762/how-to-compare-version-style-strings

@Byron
Copy link
Member

Byron commented Feb 11, 2016

A new release was just made to pypi 😁 (see #298) !

@Byron Byron modified the milestones: v1.0.2 - Fixes, v1.0.3 - Fixes Feb 13, 2016
@Byron Byron modified the milestones: v2.0.0 - Features and Fixes, v2.0.1 - Bugfixes Apr 24, 2016
@nvie nvie removed this from the v2.0.6 - Bugfixes milestone Jun 20, 2016
@Byron Byron modified the milestones: v2.0.9 - Bugfixes, v2.0.10 - Bugfixes, v2.1.0 - proper windows support, v2.1.0 - better windows support, v2.1.1 - Bugfixes Oct 16, 2016
@Byron Byron modified the milestones: v2.1.1 - Bugfixes, v2.1.2 - Bugfixes Dec 8, 2016
@Byron Byron modified the milestones: v2.1.2 - Bugfixes, v2.1.3 - Bugfixes Mar 8, 2017
stsewd added a commit to stsewd/GitPython that referenced this issue May 5, 2019
@stsewd
Copy link
Contributor

stsewd commented May 5, 2019

Agreed with #311 (comment), this just needs documentation

Byron pushed a commit that referenced this issue Jul 20, 2019
@Byron Byron added this to the v2.1.12 - Bugfixes milestone Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants