Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socketutil not usable in main #2936

Closed
totaam opened this issue Nov 14, 2020 · 5 comments
Closed

socketutil not usable in main #2936

totaam opened this issue Nov 14, 2020 · 5 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 14, 2020

Issue migrated from trac ticket # 2936

component: server | priority: minor | resolution: fixed

2020-11-14 22:17:41: brief created the issue


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

This only works with the attached patch.

@totaam
Copy link
Collaborator Author

totaam commented Nov 14, 2020

2020-11-14 22:19:18: brief uploaded file socket_util.py.patch (0.8 KiB)

also found a whitespace :)

@totaam
Copy link
Collaborator Author

totaam commented Nov 15, 2020

2020-11-15 11:52:31: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 15, 2020

2020-11-15 11:52:31: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Nov 15, 2020

2020-11-15 11:52:31: antoine commented


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"

@totaam totaam closed this as completed Nov 15, 2020
@totaam
Copy link
Collaborator Author

totaam commented Nov 15, 2020

2020-11-15 13:24:35: brief commented


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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant