Skip to content

Keep the hg 6.5 client tests working on ubuntu-latest - #33

Merged
hahn-kev merged 2 commits into
masterfrom
claude/github-actions-failure-fa2c43
Nov 5, 2026
Merged

hahn-kev merged 2 commits into
masterfrom
claude/github-actions-failure-fa2c43

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

AI summary

ubuntu-latest is now Ubuntu 26.04 (Python 3.14), and the Mercurial 6.5 bundled with the pinned Chorus client dies on startup there with partially initialized module 'threading' has no attribute 'RLock'. So the pinned leg failed on master (run) and the image with #27 wasn't pushed.

The cause isn't the Python version as such: newer CPython's importlib.util.LazyLoader imports threading itself, which loops when hg 6.5's demandimport lazy-loads threading. Ubuntu 24.04's Python 3.12.3 predates that change, which is why it used to pass; a first attempt with setup-python 3.12 (3.12.16) failed the same way.

Old clients in the field still use hg 6.5, so this keeps the leg on ubuntu-latest and sets HGDEMANDIMPORT=disable for the pinned leg only. The bundle's module policy is allow, so on 3.14 it falls back to pure Python. The latest leg (hg 7.2) keeps demandimport on; the hg3 leg runs on Python 2.7.

Checked locally: the bundle's Linux hg version reproduces the error on Python 3.14 and starts with HGDEMANDIMPORT=disable.

LexBox hit the same thing in sillsdev/languageforge-lexbox#2861 (it pinned its hg 6 legs to ubuntu-24.04 instead).

Test plan

  • The "Integration tests (pinned Chorus)" leg passes on this PR

🤖 Generated with Claude Code

hahn-kev and others added 2 commits November 5, 2026 13: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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
@hahn-kev-bot hahn-kev-bot changed the title Run the hg 6.5 client tests on Python 3.12 Keep the hg 6.5 client tests working on ubuntu-latest Nov 5, 2026

@rmunn rmunn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good plan. The only difference that HGDEMANDIMPORT=disable makes is to load Python modules eagerly when the import command is reached. (Mercurial's default behavior is to turn import statements into lazy-loading objects that only import their module when someone tries to access the module's contents). In theory this could change behavior if a module has a bug, e.g. an exception could be thrown that wouldn't have been thrown by the default Mercurial behavior. But that's not the case here, or we would have seen test failures. And setting HGDEMANDIMPORT=disable does not change what Mercurial sends or reads on the wire, how it handles merge logic, and so on.

So this is the simplest change we can make that will continue to work.

@hahn-kev
hahn-kev merged commit 7e870be into master Nov 5, 2026
5 checks passed
@hahn-kev
hahn-kev deleted the claude/github-actions-failure-fa2c43 branch November 5, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants