Bug 2345525 - python-dbus-next fails to build with Python 3.14: test_sending_file_descriptor_low_level: At index 0 diff: 'The name :1.46 was not provided by any .service files' != 'got it'
Summary: python-dbus-next fails to build with Python 3.14: test_sending_file_descripto...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-dbus-next
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aleksei Bavshin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-02-13 11:36 UTC by Karolina Surma
Modified: 2025-02-13 11:36 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-02-13 11:36:37 UTC
python-dbus-next fails to build with Python 3.14.05.

____________________ test_sending_file_descriptor_low_level ____________________

    @pytest.mark.asyncio
    async def test_sending_file_descriptor_low_level():
        bus1 = await MessageBus(negotiate_unix_fd=True).connect()
        bus2 = await MessageBus(negotiate_unix_fd=True).connect()
    
        fd_before = open_file()
        fd_after = None
    
        msg = Message(destination=bus1.unique_name,
                      path='/org/test/path',
                      interface='org.test.iface',
                      member='SomeMember',
                      body=[0],
                      signature='h',
                      unix_fds=[fd_before])
    
        def message_handler(sent):
            nonlocal fd_after
            if sent.sender == bus2.unique_name and sent.serial == msg.serial:
                assert sent.path == msg.path
                assert sent.serial == msg.serial
                assert sent.interface == msg.interface
                assert sent.member == msg.member
                assert sent.body == [0]
                assert len(sent.unix_fds) == 1
                fd_after = sent.unix_fds[0]
                bus1.send(Message.new_method_return(sent, 's', ['got it']))
                bus1.remove_message_handler(message_handler)
                return True
    
        bus1.add_message_handler(message_handler)
    
        reply = await bus2.call(msg)
>       assert reply.body == ['got it']
E       AssertionError: assert ['The name :1...ervice files'] == ['got it']
E         
E         At index 0 diff: 'The name :1.46 was not provided by any .service files' != 'got it'
E         Use -v to get more diff

test/test_fd_passing.py:103: AssertionError
------------------------------ Captured log call -------------------------------
ERROR    asyncio:base_events.py:1868 Future exception was never retrieved
future: <Future finished exception=BrokenPipeError(32, 'Broken pipe')>
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/test/test_disconnect.py", line 27, in test_bus_disconnect_before_reply
    await ping
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/dbus_next/aio/message_bus.py", line 305, in call
    await future
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/dbus_next/aio/message_bus.py", line 63, in write_callback
    self.offset += self.sock.send(self.buf[self.offset:])
                   ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [Errno 32] Broken pipe
ERROR    asyncio:base_events.py:1868 Future exception was never retrieved
future: <Future finished exception=OSError(9, 'Bad file descriptor')>
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/test/test_disconnect.py", line 56, in test_unexpected_disconnect
    await bus.wait_for_disconnect()
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/dbus_next/aio/message_bus.py", line 342, in wait_for_disconnect
    return await self._disconnect_future
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dbus-next-0.2.3-build/python-dbus-next-0.2.3/dbus_next/aio/message_bus.py", line 63, in write_callback
    self.offset += self.sock.send(self.buf[self.offset:])
                   ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 9] Bad file descriptor

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08650987-python-dbus-next/

For all our attempts to build python-dbus-next with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-dbus-next/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.