Skip to content

Commit

Permalink
Test both Python 3.9 and Python 3.12 on CI
Browse files Browse the repository at this point in the history
Python 3.12 is currently marked "test" and should not be expcted
to fully work. Assuming this successfully installs it, based on
local testing I expect two encounter two problems:

1. Currently, creating a venv with `pip` in Python 3.12 on Cygwin
   does not seem to be working, even though its own global `pip`
   exists. Running `python -m ensurepip` likewise does not work,
   reporting that the bundled `pip-24.3.1-py3-none-any.whl` does
   not exist. THe https://bootstrap.pypa.io/get-pip.py script can
   be used as a workaround, assuming the problem also happens on
   CI (which I expect). Eventually, `pip` should be fully working.

2. Once that is worked around, there seem to be problems where
   Python processes terminate unexpectedly and wrongly report
   success, or where subprocess creation fails.

   When I ran `pytest` loading it as a module (`python -m pytest`),
   it collected tests and sometimes started running them, but then
   suddenly terminated with an exit status of 0. When I ran it via
   the `pytest` command (no `python -m`), that problem also usually
   happened, but one time I got an immediate termination instead,
   reporting the following errors, yet still with a 0 exit status:

       0 [main] python3.12 2724 C:\cygwin64\bin\python3.12.exe: *** fatal error in forked process - WFSO timed out performed fork fixups and dynamic dll loading
       0 [main] python3.12 2769 C:\cygwin64\bin\python3.12.exe: *** fatal error in forked process - WFSO timed out performed fork fixups and dynamic dll loading

   This curious combinaiton of errors (or the same error arising
   and being reported in different ways?) is my main motivation for
   testing GitPython on CI with Python 3.12 in Cygwin now, even
   though the Cygwin package `python312` and assocated packages are
   still marked "test". If the problems I observed locally can be
   reproduced, then this may help to find a minimal case that shows
   the problem (assuming that it is due to a Cygwin-related bug).

This commit contains no attempt to avoid or work around either of
those two anticipated problems.
  • Loading branch information
EliahKagan committed Jan 4, 2025
1 parent 84d1b5a commit 540d49b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
runs-on: windows-latest

strategy:
matrix:
cygwin-python: [python39, python312]

fail-fast: false

env:
Expand All @@ -30,7 +33,7 @@ jobs:
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
packages: python39 python39-pip python39-virtualenv git
packages: ${{ matrix.cygwin-python }} ${{ matrix.cygwin-python }}-pip ${{ matrix.cygwin-python }}-virtualenv git

- name: Arrange for verbose output
run: |
Expand All @@ -57,7 +60,7 @@ jobs:
- name: Set up virtualenv
run: |
python -m venv .venv
${{ matrix.cygwin-python }} -m venv .venv
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
- name: Update PyPA packages
Expand Down

0 comments on commit 540d49b

Please sign in to comment.