Skip to content

mercurial: Add version 7.2.4 - #2409

Merged
luhenry merged 2 commits into
mainfrom
mercurial
Sep 28, 2026
Merged

luhenry merged 2 commits into
mainfrom
mercurial

Conversation

@luhenry

@luhenry luhenry commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Builds mercurial's C extensions (bdiff, mpatch, osutil, parsers, zstd, sha1dc). Upstream publishes no riscv64 wheel.

Mirrors upstream's own contrib/build-one-linux-wheel.sh: plain python -m build, C flavor (no --rust), then auditwheel repair.

Differs from upstream

  • Fetches the source from mercurial-scm.org/release/, not git - upstream isn't hosted on git
  • Builds via cibuildwheel/manylinux_riscv64 instead of upstream's own docker image - no riscv64 image exists there
  • Adds dnf install -y gettext for translations - the riscv64 manylinux image ships no msgfmt

Matrix: cp312/cp313/cp314 only, no cp314t - upstream publishes no free-threaded wheel either; the vendored contrib/python-zstandard reads PyObject.ob_refcnt directly, which fails to compile under free-threaded CPython on any platform.

Testing

  • adds an hg version + C-extension-policy smoke test - upstream skips wheel tests entirely (test-skip = "*")

License: OK

PyPI records no project URL for mercurial; upstream lives at
mercurial-scm.org/repo/hg (an hg repo, mirrored to
foss.heptapod.net/mercurial/mercurial-devel), not git, so this fetches
the official mercurial-scm.org/release/ tarball for the tag instead of
actions/checkout (byte-identical to the PyPI sdist, confirmed by
sha256). Confirmed locally that a plain `pip wheel` of that tarball
builds real C extensions (cext/, zstd, sha1dc) with just a C compiler -
released wheels use the C flavor, not the optional Rust backend, so no
Rust toolchain is needed.
luhenry added a commit that referenced this pull request Sep 28, 2026
Records the confirmed upstream source (mercurial-scm.org/repo/hg, not
git) and the evidence gathered while porting: byte-identical release
tarball vs PyPI sdist, C-flavor wheels (no Rust needed), local build
validation.
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 13:26 UTC

The vendored contrib/python-zstandard C extension reads
PyObject.ob_refcnt directly in safe_pybytes_resize(), which
free-threaded CPython builds don't expose that way (Py_GIL_DISABLED
changes the PyObject layout) - confirmed the failure is a plain
compile error, identical on any platform, not riscv64-specific.
indygreg/python-zstandard fixed this upstream by switching to
PyUnstable_Object_IsUniquelyReferenced() plus a compat shim for older
Pythons, but mercurial's vendored copy predates that fix and mercurial
itself publishes no cp314t wheel for any platform, so this drops the
build leg rather than carrying a forward-port of vendored third-party
code upstream hasn't adopted.
@luhenry
luhenry marked this pull request as ready for review September 28, 2026 12:13
@luhenry
luhenry merged commit 4180123 into main Sep 28, 2026
15 checks passed
@luhenry
luhenry deleted the mercurial branch September 28, 2026 12:13
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.

1 participant