The "cpython" crate is now officially unmaintained [0], and it does not support Python 3.12 [1]. Notably, due to ABI changes in Python 3.12, I cannot even guarantee that this package currently works correctly when used in conjunction with Python 3.12 (affecting both Fedora 39 and Rawhide). c.f. https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/XG7GMDZFL2RO4QHEFBJKU7YDE3AZBRVM/#XG7GMDZFL2RO4QHEFBJKU7YDE3AZBRVM The upstream author of the "cpython" crate recommends to migrate to pyo3. Versions 0.19.2 and newer of pyo3 support Python 3.12. If possible, I would recommend to work with mercurial upstream to migrate to pyo3 v0.19.2 or newer as soon as possible. [0]: https://github.com/dgrunwald/rust-cpython/commit/e815555 [1]: https://github.com/dgrunwald/rust-cpython/issues/294 Reproducible: Always
checking encoding (UTF-8)... checking Python executable (/usr/bin/python3) checking Python implementation (CPython) checking Python version (3.12.1) checking Python lib (/usr/lib64/python3.12)... checking Python security support (sni,tls1.0,tls1.1,tls1.2) checking Rust extensions (missing) checking Mercurial version (6.6.2) checking Mercurial custom build () checking module policy (rust+c-allow) checking installed modules (/usr/lib64/python3.12/site-packages/mercurial)... /usr/lib64/python3.12/site-packages/mercurial/rustext.cpython-312-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_Ready (mercurial-6.6.2-1.fc40.x86_64, mercurial-rust-6.6.2-1.fc40.x86_64) So no, it doesn't work correctly with Python 3.12. In practice, this may result in abort: accessing `persistent-nodemap` repository without associated fast implementation. (check `hg help config.format.use-persistent-nodemap` for details) if the repo was cloned with Rust extensions available.
FYI, I intend to retire the package for the "cpython" crate from Fedora 41+. It was abandoned by upstream and does not work with Python >=3.12, so as soon as Fedora 38 is EOL, the crate will not work on any current branch of Fedora. I would recommend that the Rust extensions for mercurial are disabled on Fedora 39+.
The rust subpackage is dropped in mercurial-6.5.3-2.fc39 ... and f40 and rawhide.
Thank you! I'm hoping it can be brought back in the future.
https://crates.io/crates/cpython/0.7.2 was released with backports to make it work with Python 3.12 - it is apparently used by Facebook. It is however just a potential temporary workaround, and it is probably not worth the effort to restore the package.
Note that Rawhide is already on Python 3.13, which has additional breaking changes on top of those needed to support Python 3.12.