test: interface_ipc.py might start skipping if installed capnp version changes #34016

issue fanquake openend this issue on December 5, 2025
  1. fanquake commented at 2:38 pm on December 5, 2025: member

    Noticed this on a Fedora (Rawhide) Box that has capnp 1.2.0 (recently updated from 1.1.0) and pycapnp 2.1.0 installed, but was skipping interface_ipc.py as if the Python module was not available. The failure was that pycanp 2.1.0 tries to load an older shared lib, and fails:

     0Remaining jobs: [interface_ipc.py]
     11/1 - interface_ipc.py failed, Duration: 0 s
     2
     3stdout:
     4
     5
     6stderr:
     7Traceback (most recent call last):
     8  File "/root/ci_scratch/build/test/functional/interface_ipc.py", line 20, in <module>
     9    import capnp  # type: ignore[import] # noqa: F401
    10    ^^^^^^^^^^^^
    11  File "/usr/local/lib64/python3.14/site-packages/capnp/__init__.py", line 36, in <module>
    12    from .version import version as __version__
    13  File "/usr/local/lib64/python3.14/site-packages/capnp/version.py", line 1, in <module>
    14    from .lib.capnp import _CAPNP_VERSION_MAJOR as LIBCAPNP_VERSION_MAJOR  # noqa: F401
    15    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    16ImportError: libcapnpc.so.1.0.1: cannot open shared object file: No such file or directory
    

    We catch this and skip as if the module isn’t available. Updating to pycapnp 2.2.1 solved the issue.

  2. fanquake added the label Tests on Dec 5, 2025
  3. ryanofsky commented at 3:46 pm on December 5, 2025: contributor

    Maybe this would get the failure to be reported properly:

    0--- a/test/functional/interface_ipc.py
    1+++ b/test/functional/interface_ipc.py
    2@@ -19,7 +19,7 @@ from test_framework.wallet import MiniWallet
    3 # Test may be skipped and not have capnp installed
    4 try:
    5     import capnp  # type: ignore[import] # noqa: F401
    6-except ImportError:
    7+except ModuleNotFoundError:
    8     pass [@asynccontextmanager](/bitcoin-bitcoin/contributor/asynccontextmanager/)
    
  4. fanquake commented at 4:01 pm on December 5, 2025: member
    @ryanofsky yes, that works.
  5. fanquake referenced this in commit 905dfdee86 on Jan 26, 2026
  6. fanquake renamed this:
    test: `interface_ipc.py` (might?) start skipping if installed capnp version changes
    test: `interface_ipc.py` might start skipping if installed capnp version changes
    on Jan 26, 2026
  7. hebasto commented at 1:09 pm on January 26, 2026: member

    Noticed this on a Fedora (Rawhide) Box that has capnp 1.2.0 (recently updated from 1.1.0) and pycapnp 2.1.0 installed, but was skipping interface_ipc.py as if the Python module was not available. The failure was that pycanp 2.1.0 tries to load an older shared lib, and fails:

     0Remaining jobs: [interface_ipc.py]
     11/1 - interface_ipc.py failed, Duration: 0 s
     2
     3stdout:
     4
     5
     6stderr:
     7Traceback (most recent call last):
     8  File "/root/ci_scratch/build/test/functional/interface_ipc.py", line 20, in <module>
     9    import capnp  # type: ignore[import] # noqa: F401
    10    ^^^^^^^^^^^^
    11  File "/usr/local/lib64/python3.14/site-packages/capnp/__init__.py", line 36, in <module>
    12    from .version import version as __version__
    13  File "/usr/local/lib64/python3.14/site-packages/capnp/version.py", line 1, in <module>
    14    from .lib.capnp import _CAPNP_VERSION_MAJOR as LIBCAPNP_VERSION_MAJOR  # noqa: F401
    15    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    16ImportError: libcapnpc.so.1.0.1: cannot open shared object file: No such file or directory
    

    We catch this and skip as if the module isn’t available. Updating to pycapnp 2.2.1 solved the issue.

    I can’t reproduce the issue:

     0# dnf info capnproto 2>&1 | grep Version
     1Version         : 1.3.0
     2# pip show pycapnp | grep Version
     3Version: 2.1.0
     4# ./build/test/functional/test_runner.py interface_ipc
     5Temporary test directory at /tmp/test_runner_₿_🏃_20260126_130625
     6Remaining jobs: [interface_ipc.py]
     71/1 - interface_ipc.py passed, Duration: 7 s
     8
     9TEST             | STATUS    | DURATION
    10
    11interface_ipc.py | ✓ Passed  | 7 s
    12
    13ALL              | ✓ Passed  | 7 s (accumulated) 
    14Runtime: 7 s
    
  8. fanquake commented at 1:14 pm on January 26, 2026: member

    I can’t reproduce the issue:

    It’s not clear what you tested here. You need to test the capnp shared libs being updated, without updating pycapnp.

  9. hebasto commented at 1:20 pm on January 26, 2026: member

    I can’t reproduce the issue:

    It’s not clear what you tested here.

    I’ve tested this claim: “The failure was that pycanp 2.1.0 tries to load an older shared lib, and fails:”. It wasn’t clear that updating capnp is necessary for observing the issue.

    You need to test the capnp shared libs being updated, without updating pycapnp.

    Well, this could be tricky as the Rawhide repository doesn’t keep the previous capnproto version.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-27 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me