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

gitdb2 4.0.2 requires gitdb 4.0.1 for its installation #86

Closed
andy-maier opened this issue May 28, 2023 · 5 comments
Closed

gitdb2 4.0.2 requires gitdb 4.0.1 for its installation #86

andy-maier opened this issue May 28, 2023 · 5 comments

Comments

@andy-maier
Copy link

The issue is that gitdb2 4.0.2 requires gitdb 4.0.1 for its installation. That is defined in the install_requires argument of its setup.py file (from the downloaded tarball of gitdb2 4.0.2 on Pypi):

from setuptools import setup

setup(
    name="gitdb2",
    version="4.0.2",
    author="Sebastian Thiel",
    author_email="[email protected]",
    description="A mirror package for gitdb",
    long_description="This is a mirror package for `gitdb <https://pypi.org/project/gitdb/>`_. Consider installing it directly instead.",
    url="https://github.com/gitpython-developers/gitdb",
    install_requires=["gitdb>=4.0.1"],    # line with the problem
)

This causes the following failure when installing gitdb2 on Python 2.7:

ERROR: Could not find a version that satisfies the requirement gitdb>=4.0.1 (from gitdb2>=2.0.0->-r dev-requirements.txt (line 338)) (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)

A second issue is that gitdb2 4.0.2 no longer defines its supported Python versions. Up to gitdb2 version 3.0.3, the supported Python versions were properly specified.

A circumvention for users is to exclude gitdb2==4.0.2 (hoping that a future version of gitdb2 will fix that).

@Harmon758
Copy link
Member

Please see the pinned issue, #59.
As indicated by the descriptions, gitdb2 is now intentionally a mirror of gitdb, which probably should be installed directly instead.
Requiring gitdb is the sole purpose of the mirror package, and deferring to gitdb for the supported Python versions is intentional, so that any updates to that in future versions of gitdb don't require additional gitdb2 releases.

@Harmon758 Harmon758 closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2023
@andy-maier
Copy link
Author

andy-maier commented May 28, 2023

The gitdb2 package 4.0.2 is still broken for Python 2.7, since it installs on Python 2.7 due to the missing python_requires, and the gitdb version 4.0.1 it requires does not support Python 2.7.

If you had just not released gitdb2 4.0.2, everything would have been fine with gitdb2.
You could fix that by adding a python_requires>=3.4 to gitdb2

We are pinning gitdb2 to <4.0 to circumvent the issue.

@Harmon758
Copy link
Member

Again, it is not broken. It is working as intended, which is as a mirror package that installs gitdb.

@andy-maier
Copy link
Author

It is broken for Python 2.7 users. If you don't believe that, try it yourself.

@Harmon758
Copy link
Member

Harmon758 commented May 28, 2023

gitdb2 3.0.0 dropped support for Python 2.7 when it reached EOL over three years ago.
gitdb2 4.0.2 itself was also released over three years ago, so I'm not sure why you're encountering this now, but Python 2.7 support is not something that will be reintroduced.

You really shouldn't be using Python 2.7 anymore, but if you need to, pinning gitdb2 to <3 is the way to do so, as it was when gitdb2 3.0.0 was released.

If you had just not released gitdb2 4.0.2, everything would have been fine with gitdb2.

Again, please refer to the pinned issue, #59.
If gitdb2 had not been changed to a mirror package, it would be a dead package with no new releases to match gitdb. This was done as a major version release though, so a breaking change should definitely not be unexpected.

You could fix that by adding a python_requires>=3.4 to gitdb2

No, a new release with that addition would not resolve your issue of gitdb2 no longer supporting Python 2.7. pip would simply resolve back to 4.0.2 and show you the same error.

Even if that weren't the case, as a mirror package, the new release itself would misleadingly advertise support for Python 3.4, 3.5, 3.6, and newer, even when gitdb no longer supports those Python versions.

Again, as I said:

deferring to gitdb for the supported Python versions is intentional, so that any updates to that in future versions of gitdb don't require additional gitdb2 releases.

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

No branches or pull requests

2 participants