From c1618cc08024d82ac25bba5dd8e19a62db6d0829 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 5 Nov 2026 13:12:19 +0700 Subject: [PATCH 1/2] Run the hg 6.5 client tests on Python 3.12 ubuntu-latest is now Ubuntu 26.04 with Python 3.14, and the Mercurial 6.5 bundled with the pinned Chorus client can't start on it (its C extensions stop at 3.13), so the pinned leg failed and master's image wasn't pushed. Old clients in the field still use hg 6.5, so keep testing it with setup-python instead of dropping it or moving the job to ubuntu-24.04. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docker-image.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e0cd8e2..c66aadd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -94,6 +94,15 @@ jobs: if: matrix.client == 'hg3' run: sudo ln -s "${{ steps.python.outputs.python-path }}" /usr/bin/python2 + # The Mercurial 6.5 bundle's Linux hg is a #!/usr/bin/env python3 script with C extensions + # built for Python 3.8-3.13; it can't start on ubuntu-latest's Python 3.14. Old clients in the + # field still use it, so put a Python it supports first on PATH. + - name: Set up Python 3.12 for Mercurial 6.5 + if: matrix.client == 'pinned' + uses: actions/setup-python@v6 + with: + python-version: '3.12' + - name: Run integration tests against the image working-directory: csharp env: From ca8be46cf3c3df75b4a0369be128c818f4c9a18e Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 5 Nov 2026 13:36:23 +0700 Subject: [PATCH 2/2] Disable hg demandimport for the hg 6.5 client instead Python 3.12 from setup-python didn't help: the failure isn't the Python version as such but CPython's LazyLoader importing threading itself (later 3.12 releases and 3.14), which deadlocks Mercurial 6.5's demandimport when it lazy-loads threading. Ubuntu 24.04's 3.12.3 predates that, which is why it used to pass. HGDEMANDIMPORT=disable gets hg 6.5 starting on the runner's own Python 3.14 (its module policy falls back to pure Python). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docker-image.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c66aadd..373db68 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -94,15 +94,6 @@ jobs: if: matrix.client == 'hg3' run: sudo ln -s "${{ steps.python.outputs.python-path }}" /usr/bin/python2 - # The Mercurial 6.5 bundle's Linux hg is a #!/usr/bin/env python3 script with C extensions - # built for Python 3.8-3.13; it can't start on ubuntu-latest's Python 3.14. Old clients in the - # field still use it, so put a Python it supports first on PATH. - - name: Set up Python 3.12 for Mercurial 6.5 - if: matrix.client == 'pinned' - uses: actions/setup-python@v6 - with: - python-version: '3.12' - - name: Run integration tests against the image working-directory: csharp env: @@ -112,6 +103,11 @@ jobs: HGRESUME_SKIP_BUILD: '1' HGRESUME_HOST_PORT: ${{ matrix.host-port }} TEST_FILTER: ${{ matrix.filter }} + # Mercurial 6.5's demandimport lazy-loads `threading`, and since CPython made LazyLoader + # import threading itself (later 3.12 releases on, incl. ubuntu-latest's 3.14) hg dies on startup with "partially + # initialized module 'threading'". Old clients in the field still run hg 6.5, so keep + # testing it with demandimport off; hg 7 fixed this, so the latest leg keeps it on. + HGDEMANDIMPORT: ${{ matrix.client == 'pinned' && 'disable' || '' }} run: | args=(test/HgResume.IntegrationTests/HgResume.IntegrationTests.csproj "-p:ChorusClient=${{ matrix.client }}" --logger "console;verbosity=normal")