altdesktop / python-dbus-next

🚌 The next great DBus library for Python with asyncio support
https://python-dbus-next.readthedocs.io/en/latest/
MIT License
187 stars 58 forks source link

test_tcp_connection_with_forwarding failure with dbus 1.14.4 #135

Open SFrijters opened 1 year ago

SFrijters commented 1 year ago
=================================== FAILURES ===================================
_____________________ test_tcp_connection_with_forwarding ______________________

event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>

    @pytest.mark.asyncio
    async def test_tcp_connection_with_forwarding(event_loop):
        closables = []
        host = '127.0.0.1'
        port = '55556'

        addr_info = parse_address(os.environ.get('DBUS_SESSION_BUS_ADDRESS'))
        assert addr_info
>       assert 'abstract' in addr_info[0][1]
E       AssertionError: assert 'abstract' in {'guid': '80575dbdd24507fd614f7dfa63569e61', 'path': '/tmp/dbus-nXrJp9b9fo'}

test/test_tcp_address.py:18: AssertionError

It seems that dbus 1.14.4 made a backwards incompatible change:

Excerpt from https://gitlab.freedesktop.org/dbus/dbus/-/blob/dbus-1.14.4/NEWS :

Behaviour changes:

• On Linux, dbus-daemon and other uses of DBusServer now create a
  path-based Unix socket, unix:path=..., when asked to listen on a
  unix:tmpdir=... address. This makes unix:tmpdir=... equivalent to
  unix:dir=... on all platforms.
  Previous versions would have created an abstract socket, unix:abstract=...,
  in this situation.

I don't know if the test needs fixing or anything else needs to be changed, just reporting what I found so far.

dvzrv commented 1 year ago

Hi! I also just stumbled upon this issue with the ongoing Python 3.11 rebuild on Arch Linux. Is there a fix besides disabling this test?

elParaguayo commented 1 year ago

@dvzrv I haven't seen the maintainer around for quite a few months now so skipping that test (which I can see you've done) is probably the best approach for now.