-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples #3229
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
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
8d1d653 to
fcc410a
Compare
tiran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, @pablogsal
- Please add a News entry with the
blurbtool - Instead of
json.dumps+send_string(), how aboutsend_json()instead? https://pyzmq.readthedocs.io/en/latest/api/zmq.html#zmq.Socket.send_json
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I didn't expect the Spanish Inquisition! |
|
Nobody expects the Spanish Inquisition! @tiran: please review the changes made to this pull request. |
tiran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good work 🥇
|
🐍🍒⛏🤖 Thanks @pablogsal for the PR, and @tiran for merging it 🌮🎉.I'm working now to backport this PR to: 3.6. |
…mples (pythonGH-3229) * Fix ZeroMQSocketListener and ZeroMQSocketHandler examples * Use send_json and recv_json to simplify pyzmq interfacing * Add News entry (cherry picked from commit 586c050)
|
GH-3430 is a backport of this pull request to the 3.6 branch. |
This PR fixes two documentation issues regarding the
ZeroMQSocketListenerandZeroMQSocketHandlerexamples in the Logging Cookbook:The first issue is that in the
__ init__method for theZeroMQSocketListenerthe base class__ init__is never called and therefore the internal variables are not correctly initialized. This leads to an emptyhandlersattribute and a undefinedqueueattribute.The second issue is that
zmq.Socket.sendandzmq.Socket.setsockoptonly admits bytecode variables and therefore it fails in Python3 when using plain strings. The fix is to usezmq.Socket.send_stringandmq.Socket.setsockopt_stringinstead.https://bugs.python.org/issue31294