Skip to content

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

Closed

Description

@fanquake

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:

Remaining jobs: [interface_ipc.py]
1/1 - interface_ipc.py failed, Duration: 0 s

stdout:


stderr:
Traceback (most recent call last):
  File "/root/ci_scratch/build/test/functional/interface_ipc.py", line 20, in <module>
    import capnp  # type: ignore[import] # noqa: F401
    ^^^^^^^^^^^^
  File "/usr/local/lib64/python3.14/site-packages/capnp/__init__.py", line 36, in <module>
    from .version import version as __version__
  File "/usr/local/lib64/python3.14/site-packages/capnp/version.py", line 1, in <module>
    from .lib.capnp import _CAPNP_VERSION_MAJOR as LIBCAPNP_VERSION_MAJOR  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: 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.

Activity

  1. ryanofsky commented on Dec 5, 2025

    @ryanofsky
    Contributor

    Maybe this would get the failure to be reported properly:

    --- a/test/functional/interface_ipc.py
    +++ b/test/functional/interface_ipc.py
    @@ -19,7 +19,7 @@ from test_framework.wallet import MiniWallet
     # Test may be skipped and not have capnp installed
     try:
         import capnp  # type: ignore[import] # noqa: F401
    -except ImportError:
    +except ModuleNotFoundError:
         pass
     
     @asynccontextmanager
  2. fanquake commented on Dec 5, 2025

    @fanquake
    MemberAuthor

    @ryanofsky yes, that works.

  3. added a commit that references this issue on Jan 26, 2026
    905dfde
  4. changed the title [-]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
  5. hebasto commented on Jan 26, 2026

    @hebasto
    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:

    Remaining jobs: [interface_ipc.py]
    1/1 - interface_ipc.py failed, Duration: 0 s
    
    stdout:
    
    
    stderr:
    Traceback (most recent call last):
      File "/root/ci_scratch/build/test/functional/interface_ipc.py", line 20, in <module>
        import capnp  # type: ignore[import] # noqa: F401
        ^^^^^^^^^^^^
      File "/usr/local/lib64/python3.14/site-packages/capnp/__init__.py", line 36, in <module>
        from .version import version as __version__
      File "/usr/local/lib64/python3.14/site-packages/capnp/version.py", line 1, in <module>
        from .lib.capnp import _CAPNP_VERSION_MAJOR as LIBCAPNP_VERSION_MAJOR  # noqa: F401
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ImportError: 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:

    # dnf info capnproto 2>&1 | grep Version
    Version         : 1.3.0
    # pip show pycapnp | grep Version
    Version: 2.1.0
    # ./build/test/functional/test_runner.py interface_ipc
    Temporary test directory at /tmp/test_runner_₿_🏃_20260126_130625
    Remaining jobs: [interface_ipc.py]
    1/1 - interface_ipc.py passed, Duration: 7 s
    
    TEST             | STATUS    | DURATION
    
    interface_ipc.py | ✓ Passed  | 7 s
    
    ALL              | ✓ Passed  | 7 s (accumulated) 
    Runtime: 7 s
    
    
  6. fanquake commented on Jan 26, 2026

    @fanquake
    MemberAuthor

    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.

  7. hebasto commented on Jan 26, 2026

    @hebasto
    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.

  8. added a commit that references this issue on Jan 28, 2026
    2dd5e7b
  9. added a commit that references this issue on Jan 30, 2026
    19b3e2e
  10. added a commit that references this issue on May 8, 2026
    5b0e6a7
  11. added a commit that references this issue on Jun 28, 2026
    79e8752
  12. added a commit that references this issue on Jun 30, 2026
    ea167ad
  13. added a commit that references this issue on Aug 19, 2026
    9d06309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions