Pin Python 3.9.16 on Cygwin CI by EliahKagan · Pull Request #1814 · gitpython-developers/GitPython (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

EliahKagan

@EliahKagan

This uses Python 3.8.16 (provided by the Cygwin package python38 at version 3.8.16-1), to work around the problem that pip has begun to block on some PyPI package downloads when Python 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1) is used.

I also tried a bunch of other stuff, which is listed below and can be examined in full detail, with all individual diffs and most CI results, at #2.

This is for a recent problem where "pip install -U" in the virtual environment in a Cygwin test job seems to block indefinitely on downloading the wheel package itself (not other packages' wheels).

Maybe this will overcome the next blockage, which is the codecov PyPI package, downloading a .tar.gz file.

This doesn't fix the bigger issue, it just addresses something from the last commit.

This is not a usable solution, but it is useful for troubleshooting.

And don't upgrade it or other PyPI packages.

This tries with an older pip, but if the problem is the build rather than the version, then it would also help.

This won't fix it but is diagnostic, to reveal the URL for the coverage package, so I can see what happens when that is installed more manually.

Since it has to verify previous work.

@EliahKagan

The latest currently packaged version of Python 3.9 for Cygwin is 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1). That version, at least as we are using it, has a problem where pip has begun to block on some PyPI package downloads.

In 73ebcfa (#2), I worked around this problem by downgrading the minor version of Python to 3.8. But it is better to use 3.9 if we can, since it is currently the latest minor version of Python in the Cygwin repositories, and also because (relating to that) it is used more often, and thus probably used more often with GitPython, than 3.8.

This upgrades Python on Cygwin but not all the way. It upgrades it to the latest (or latest currently available) patch version of 3.9 packaged for Cygwin of those that strictly precede 3.9.18 where the problem occurs. That version is 3.9.16, provided by the Cygwin package python39 at version 3.9.16-1.

This version may eventually no longer be available for download from Cygwin's repositories, so hopefully a real solution or better workaround will be found by then, or perhaps a future update to the package itself will fix the problem.

I also tried some more other stuff since finding 3.8 to work in 73ebcfa. Changes since then are listed below. They can be examined in full detail, with individual diffs and CI results, at #3.

Changing it to Python 3.8 worked, but I want to check that it was actually the use of Python 3.8, rather than other seemingly small changes made to support using Python 3.8, that made the difference.

This reverts commit b55cbfb.

Python 3.8 worked with cygwin-install-action, but I want to make the change to setup-cygwin by itself first before trying it with 3.9, in case I am using setup-cygwin incorrectly.

Pinning and skipping -U for PyPA packages worked. Let's see if it was really pinning that made the difference.

Pinning works, and merely omitting the -U for PyPA package doesn't. Examining the output of runs that used install-cygwin-action and attemped pinning Cygwin package versions shows newer versions were installed, whereas pinning is really happening with setup-cygwin.

This tries pinning just the Cygwin package for pip, rather than for Python 3.9. I don't expect this to work.

And not pip, but this does not add back the -U for PyPA yet.

This is extremely unlikely to work, I just want to check.

That is, this puts back all the other stuff the way it was on the main branch when the breakage occurred, besides changing from cygwin-install-action to setup-cygwin to make pinning work and using it to get version 3.9.16-1 of the Cygwin python39 package.

@EliahKagan EliahKagan changed the titleUse Python 3.9.16 instead of 3.9.18 on Cygwin CI Pin Python 3.9.16 on Cygwin CI

Jan 28, 2024

This was referenced

Jan 28, 2024

lettuce-bot bot referenced this pull request in lettuce-financial/github-bot-signed-commit

Feb 15, 2024

@lettuce-bot

renovate bot referenced this pull request in allenporter/flux-local

Feb 16, 2024

@renovate

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Jan 4, 2025

@EliahKagan

We pinned Python 3.9.16 on Cygwin CI in gitpython-developers#1814 (by requiring 3.9.16-1 as the exact version of the python39 Cygwin package, along with other supporting changes). We did this to solve a problem where Python 3.9.18-1, which contained a bug that broke GitPython CI (and various other software), would be selected.

Version 3.9.18-1 was marked back to being a "test" package shortly after the bug was reported, and was subsequently removed altogether from the Cygwin repositories. Because the affected package version effectively no longer exists, and because this issue is known and a non-"test" version still affected by it is very unlikely to be released in the future, this pinning has been decisively unnecessary for some time, though still not harmful.

This commit undoes the pinning, so that the python39 package can be installed at a higher version if one becomes available. This serves two purposes.

Although this is uncertain, the change is a simplification, so I think it is reasonable to do now.

Note that the pinning being undone here only affects the distinction between different 3.9.* versions. python39 and python312 are different Cygwin packages altogether, with correspondingly different python39-* and python312-* associated packages; this is not unpinning Python 3.9 in a way that would cause Python 3.12 to be selected instead of it.

EliahKagan added a commit to EliahKagan/GitPython that referenced this pull request

Jan 4, 2025

@EliahKagan

We pinned Python 3.9.16 on Cygwin CI in gitpython-developers#1814 (by requiring 3.9.16-1 as the exact version of the python39 Cygwin package, along with other supporting changes). We did this to solve a problem where Python 3.9.18-1, which contained a bug that broke GitPython CI (and various other software), would be selected.

Version 3.9.18-1 was marked back to being a "test" package shortly after the bug was reported, and was subsequently removed altogether from the Cygwin repositories. Because the affected package version effectively no longer exists, and because this issue is known and a non-"test" version still affected by it is very unlikely to be released in the future, this pinning has been decisively unnecessary for some time, though still not harmful.

This commit undoes the pinning, so that the python39 package can be installed at a higher version if one becomes available. This serves two purposes.

Although this is uncertain, the change is a simplification, so I think it is reasonable to do now.

Note that the pinning being undone here only affects the distinction between different 3.9.* versions. python39 and python312 are different Cygwin packages altogether, with correspondingly different python39-* and python312-* associated packages; this is not unpinning Python 3.9 in a way that would cause Python 3.12 to be selected instead of it.