xpra icon
Bug tracker and wiki

Opened 2 weeks ago

Closed 13 days ago

Last modified 13 days ago

#2936 closed defect (fixed)

socketutil not usable in main

Reported by: brief Owned by: Antoine Martin
Priority: minor Milestone: 4.1
Component: server Version: trunk
Keywords: Cc:


While investigating #2125, I tried to use socket_util in main.

This only works with the attached patch.

Attachments (1)

socket_util.py.patch (825 bytes) - added by brief 2 weeks ago.
also found a whitespace :)

Download all attachments as: .zip

Change History (4)

Changed 2 weeks ago by brief

Attachment: socket_util.py.patch added

also found a whitespace :)

comment:1 Changed 2 weeks ago by brief

Version: 3.0.xtrunk

comment:2 Changed 13 days ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks, applied both: r27941 + r27942. Will backport.

Out of curiosity, how did it fail for you?

It's best to import from xpra.scripts.config directly but importing it indirectly from xpra.scripts.main should still work:

python3 -c "from xpra.scripts.main import InitExit"

comment:3 Changed 13 days ago by brief

If you try to use a function socket_util in main, e.g.

from xpra.net.socket_util import parse_bind_vsock

it gives the following error:

ImportError: cannot import name 'parse_bind_vsock' from partially initialized module 'xpra.net.socket_util' (most likely due to a circular import)
Note: See TracTickets for help on using tickets.