-
Notifications
You must be signed in to change notification settings - Fork 636
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
Add provisional implementation for #1081 #1082
base: main
Are you sure you want to change the base?
Conversation
Sorry for the delay in reviewing this. I've no specific objection, but it doesn't really seem like pyzmq is the right place for it. What's the benefit of this over, say, using the builtin |
The main benefit is to be able to integrate with various libraries that deal with user input such as CLI toolkits, config parsers, ORM etc. Although it can be developed as an independent package, having it bundled provide the following benefits:
|
that's not generally true, urlparse extracts host and port as well: parsed = urlparse('tcp://127.0.0.1:5555')
parsed.port # 5555
parsed.hostname # '127.0.0.1' but that doesn't cover more complex non-url transports, such as the multi-endpoint URLs separated by This is fine by me. What more do you want to do for this PR? Can you add docs and tests? |
I would like to see how far it can / should be integrated into pyzmq. I think both |
I don't think we should change the return type of any of the existing methods, but accepting these objects in bind/connect makes sense. |
Perhaps both |
I think that specifically, no base pyzmq APIs should return anything but basic types. Providing convenient wrappers is okay, but I wouldn't change the types, even if they are subclasses that satisfy |
@minrk Ok, but considering that, would it be better to have them as strings or objects? |
Objects, I think. |
UserString would allow to avoid any changes to pyzmq though. Which makes sense, as URL introspection does not make sense there. Not with current API. |
No description provided.