Skip to content

Commit

Permalink
Use Python 3.8 on Cygwin CI
Browse files Browse the repository at this point in the history
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.

* Try not installing/upgrading wheel for Cygwin CI

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).

* Try not upgrading/installing pip/setuptools either on Cygwin

* Try installing pytho39-wheel Cygwin package

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

* Try upgrading wheel, but after upgrading pip

* Try always running pip on Cygwin as "python -m pip"

* Try using a venv on Cygwin

* Use "python -v -m pip" to see some of what's going on

* Undo venv; use "python -m pip -vvv" to see what's going on

* Undo all debugging changes except passing "-vvv"

* Try with "--no-cache-dir"

* Try with different tmp dir for pip runs

* Try with python39=3.9.16-1

* Try not upgrading setuptools

* Try not installing Cygwin python39-pip package

* Run pip freeze effectively

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

* Try not installing python39-virtualenv either

* Try giving IPv4 for files.pythonhosted.org in hosts file

* Try downloading wheel with wget

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

* Try with python39-pip=23.0.1-1

And don't upgrade it or other PyPI packages.

* Pin pip with pip (Cygwin package doesn't pin)

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

* Stop pinning; keep skipping -U for PyPA; instrument with -vvv

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.

* Try installing coverage[toml] separately

* Unset -vvv to see the bigger picture more easily

* Try killing pip after a timeout and rerunning it

* Use SIGKILL

* Increase timeout from 70 to 120 seconds per try

* Give each try a little more time than the last

Since it has to verify previous work.

* Tweak (re)try parameters

* Try Python 3.8
  • Loading branch information
EliahKagan authored Jan 28, 2024
1 parent 10cdd03 commit 73ebcfa
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install Cygwin
uses: cygwin/cygwin-install-action@v4
with:
packages: python39 python39-pip python39-virtualenv git
packages: python38 python38-pip python38-virtualenv git
add-to-path: false # No need to change $PATH outside the Cygwin environment.

- name: Arrange for verbose output
Expand All @@ -55,28 +55,23 @@ jobs:
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig
- name: Ensure the "pip" command is available
run: |
# This is used unless, and before, an updated pip is installed.
ln -s pip3 /usr/bin/pip
- name: Update PyPA packages
run: |
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel
# Get the latest pip, setuptools, and wheel.
python3.8 -m pip install -U pip setuptools wheel
- name: Install project and test dependencies
run: |
pip install ".[test]"
python3.8 -m pip install ".[test]"
- name: Show version and platform information
run: |
uname -a
command -v git python
command -v git python3.8
git version
python --version
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
python3.8 --version
python3.8 -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
- name: Test with pytest
run: |
pytest --color=yes -p no:sugar --instafail -vv
python3.8 -m pytest --color=yes -p no:sugar --instafail -vv

0 comments on commit 73ebcfa

Please sign in to comment.