Skip to content

incorrect 'git' version for GitPython==3.1.28 installed from PyPI #1500

Closed
@boegel

Description

@boegel
Contributor

It looks like there's mistake in the release of GitPython 3.1.28 with respect to the version.

Here's the output I'm getting when GitPython 3.1.28 is installed (using pip3 install)

$ python3 -c 'import git; print(git.__version__)'
git

With older GitPython versions, I'm getting a proper version instead:

$ python3 -c 'import git; print(git.__version__)'
3.1.27

Activity

branfosj

branfosj commented on Oct 10, 2022

@branfosj

In 21ec529 there is the change:

-__version__ = 'git'
+__version__ = "git"
 
 
-#{ Initialization
+# { Initialization
 def _init_externals() -> None:
     """Initialize external projects by putting them into the path"""
-    if __version__ == 'git' and 'PYOXIDIZER' not in os.environ:
-        sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
+    if __version__ == "git" and "PYOXIDIZER" not in os.environ:
+        sys.path.insert(1, osp.join(osp.dirname(__file__), "ext", "gitdb"))

However, setup.py puts the version in by doing a find/replace with a search for 'git':

line = line.replace("'git'", "'%s'" % VERSION)

and that fails, which leaves "git" in two places in __init__.py.

added a commit that references this issue on Oct 10, 2022
added this to the v3.1.29 - Bugfixes milestone on Oct 10, 2022
Byron

Byron commented on Oct 10, 2022

@Byron
Member

Thanks for letting me know! This should be fixed with v3.1.29, please let me know in the comments if it isn't though.

boegel

boegel commented on Oct 11, 2022

@boegel
ContributorAuthor

I can confirm that a proper versio is printed for GitPython 3.1.29, thanks a lot for the quick fix!

$ pip3 install GitPython==3.1.29
$ python3 -c 'import git; print(git.__version__)'
3.1.29
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

        Participants

        @branfosj@Byron@boegel

        Issue actions

          incorrect 'git' version for GitPython==3.1.28 installed from PyPI · Issue #1500 · gitpython-developers/GitPython