xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 10 months ago

Closed 10 months ago

Last modified 8 months 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:

Description

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 10 months ago.
also found a whitespace :)

Download all attachments as: .zip

Change History (5)

Changed 10 months ago by brief

Attachment: socket_util.py.patch added

also found a whitespace :)

comment:1 Changed 10 months ago by brief

Version: 3.0.xtrunk

comment:2 Changed 10 months 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 10 months 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)

comment:4 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2936

Note: See TracTickets for help on using tickets.