It seems, that every version in tree is incompatible with dev-python/zstandard. If you try to clone a repo, it will fail. "https://hg.prosody.im/prosody-modules/" is an example public repo. $ hg clone https://hg.prosody.im/prosody-modules/ Target directory: prosody-modules abort: compression engine zstd could not be loaded Thanks to slashbeast, the problem is 'hg' itself. If you look into 'utils/compression.py', search for line 'from .. import zstd # pytype: disable=import-error' This seems to be incompatible with dev-python/zstandard. If replaced with 'import zstandard as zstd', everything works normal. BUT: This code is even present on the lastest upstream master, so it should be checked, what to do. -> https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/utils/compression.py
Upstream says: <> https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-vcs/mercurial/mercurial-5.6.1.ebuild#n153 <> that's wrong. <> Correct options are: <> 1) use our bundled zstandard <> 2) omit our bundled zstandard <> other choices are incorrect and are likely to be broken (as you've observed)
Which version of dev-python/zstandard are you using? For me it works with 0.14.0-r1.
And also which Python implementation are you using? Is it PyPy?
(In reply to Cédric Krier from comment #2) > Which version of dev-python/zstandard are you using? For me it works with > 0.14.0-r1. Newest, 0.15.1. (In reply to Cédric Krier from comment #3) > And also which Python implementation are you using? Is it PyPy? [ebuild R ] dev-python/zstandard-0.15.1::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 -pypy3 (-python3_6) -python3_7" 0 KiB I am not using pypy, plain python3.
The 0.15.1 seems to no longer providing zstd.cpython-*-linux-gnu.so as module that can be loaded. However the zstandard module have compatible interface.
(In reply to Piotr Karbowski from comment #5) > The 0.15.1 seems to no longer providing zstd.cpython-*-linux-gnu.so as > module that can be loaded. However the zstandard module have compatible > interface. Indeed they seem to have rename into "backend_c.cpython-*-linux-gnu.so" and move it under `zstandard` directory. I will adapt the ebuild to import zstandard as zstd (which will permit also to support cffi only interpreter like PyPY).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05f063dc477fdbb858b81e1bdf754e04594b133d commit 05f063dc477fdbb858b81e1bdf754e04594b133d Author: Cédric Krier <cedk@gentoo.org> AuthorDate: 2021-01-06 09:24:15 +0000 Commit: Cédric Krier <cedk@gentoo.org> CommitDate: 2021-01-06 09:24:41 +0000 dev-vcs/mercurial: import zstandard instead of zstd zstandard >=0.15 does not provide anymore zstd. Closes: https://bugs.gentoo.org/763984 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Cédric Krier <cedk@gentoo.org> .../mercurial/{mercurial-5.6.1.ebuild => mercurial-5.6.1-r1.ebuild} | 2 +- dev-vcs/mercurial/mercurial-9999.ebuild | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Great, many thanks :-)