Content-Length: 6373 | pFad | http://github.com/gitpython-developers/GitPython/pull/1988.patch
thub.com
From 93f29c20d8f9a2f7e32360155f7ae4a2c1aa0f19 Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Sat, 4 Jan 2025 10:33:57 -0500
Subject: [PATCH 1/2] Test both Python 3.9 and Python 3.12 on CI
Python 3.12 is currently marked "test" and should not be expected
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
And one time I got an immediate termination reporting this
slightly different error, also with an exit status of 0:
0 [main] python3.12 3371 C:\cygwin64\bin\python3.12.exe: *** fatal error in forked process - WFSO timed out after longjmp
This curious combination 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.
---
.github/workflows/cygwin-test.yml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml
index d42eb0587..80912dfde 100644
--- a/.github/workflows/cygwin-test.yml
+++ b/.github/workflows/cygwin-test.yml
@@ -7,6 +7,16 @@ jobs:
runs-on: windows-latest
strategy:
+ matrix:
+ python-version: ["3.9", "3.12"]
+ include:
+ - python-version: "3.9"
+ python-cygwin: python39
+ python-command: python3.9
+ - python-version: "3.12"
+ python-cygwin: python312
+ python-command: python3.12
+
fail-fast: false
env:
@@ -30,7 +40,7 @@ jobs:
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
- packages: python39 python39-pip python39-virtualenv git
+ packages: ${{ matrix.python-cygwin }} ${{ matrix.python-cygwin }}-pip ${{ matrix.python-cygwin }}-virtualenv git
- name: Arrange for verbose output
run: |
@@ -57,7 +67,7 @@ jobs:
- name: Set up virtualenv
run: |
- python -m venv .venv
+ ${{ matrix.python-command }} -m venv .venv
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
- name: Update PyPA packages
From 399eb7dfb459100868173f9314598b9b1037a735 Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Sat, 4 Jan 2025 11:27:18 -0500
Subject: [PATCH 2/2] Bootstrap `pip` in Cygwin Python 3.12 venv in a separate
step
This works around a problem in Python 3.12 on Cygwin where `pip`
fails to intall in a venv via `ensurepip` (both implicitly when the
venv is created normally, and explicitly when `python -m ensurepip`
is attempted), by creating the venv with `--without-pip` and then,
once the venv is set up, bootstrapping `pip` in it by running the
https://bootstrap.pypa.io/get-pip.py script.
Eventually, when `pip` is working automatically in a venv in
Python 3.12 on Cygwin (the problem is specific to that combination,
and the Cygwin `python312*` packages are still marked "test"), this
special-casing can be removed.
---
.github/workflows/cygwin-test.yml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml
index 80912dfde..bc1c34e1d 100644
--- a/.github/workflows/cygwin-test.yml
+++ b/.github/workflows/cygwin-test.yml
@@ -12,10 +12,10 @@ jobs:
include:
- python-version: "3.9"
python-cygwin: python39
- python-command: python3.9
+ venv-args: ''
- python-version: "3.12"
python-cygwin: python312
- python-command: python3.12
+ venv-args: --without-pip
fail-fast: false
@@ -40,7 +40,7 @@ jobs:
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
- packages: ${{ matrix.python-cygwin }} ${{ matrix.python-cygwin }}-pip ${{ matrix.python-cygwin }}-virtualenv git
+ packages: ${{ matrix.python-cygwin }} ${{ matrix.python-cygwin }}-pip ${{ matrix.python-cygwin }}-virtualenv git wget
- name: Arrange for verbose output
run: |
@@ -67,9 +67,14 @@ jobs:
- name: Set up virtualenv
run: |
- ${{ matrix.python-command }} -m venv .venv
+ python${{ matrix.python-version }} -m venv ${{ matrix.venv-args }} .venv
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
+ - name: Bootstrap pip in virtualenv
+ if: contains(matrix.venv-args, '--without-pip')
+ run: |
+ wget -qO- https://bootstrap.pypa.io/get-pip.py | python
+
- name: Update PyPA packages
run: |
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/gitpython-developers/GitPython/pull/1988.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy