Skip to content

Commit 73ebcfa

Browse files
authored
Use Python 3.8 on Cygwin CI
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
1 parent 10cdd03 commit 73ebcfa

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Diff for: .github/workflows/cygwin-test.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install Cygwin
3131
uses: cygwin/cygwin-install-action@v4
3232
with:
33-
packages: python39 python39-pip python39-virtualenv git
33+
packages: python38 python38-pip python38-virtualenv git
3434
add-to-path: false # No need to change $PATH outside the Cygwin environment.
3535

3636
- name: Arrange for verbose output
@@ -55,28 +55,23 @@ jobs:
5555
# and cause subsequent tests to fail
5656
cat test/fixtures/.gitconfig >> ~/.gitconfig
5757
58-
- name: Ensure the "pip" command is available
59-
run: |
60-
# This is used unless, and before, an updated pip is installed.
61-
ln -s pip3 /usr/bin/pip
62-
6358
- name: Update PyPA packages
6459
run: |
65-
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
66-
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel
60+
# Get the latest pip, setuptools, and wheel.
61+
python3.8 -m pip install -U pip setuptools wheel
6762
6863
- name: Install project and test dependencies
6964
run: |
70-
pip install ".[test]"
65+
python3.8 -m pip install ".[test]"
7166
7267
- name: Show version and platform information
7368
run: |
7469
uname -a
75-
command -v git python
70+
command -v git python3.8
7671
git version
77-
python --version
78-
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
72+
python3.8 --version
73+
python3.8 -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
7974
8075
- name: Test with pytest
8176
run: |
82-
pytest --color=yes -p no:sugar --instafail -vv
77+
python3.8 -m pytest --color=yes -p no:sugar --instafail -vv

0 commit comments

Comments
 (0)