restore zmq.DRAFT_API meaning drafts are actually available #2126
+29
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
check both runtime zmq.has and build-time
PYZMQ_DRAFT_APIfor pyzmq, both of which have to be set for drafts to work. This is relevant because pyzmq built without drafts (even linked against libzmq built without drafts) can run against libzmq with drafts, and everything should work, but it should work as if drafts are unavailable. You can create draft sockets, but can't use them much because the additional symbol methods (join, leave, poller, etc.) won't be available.If pyzmq is built without drafts and libzmq is,
has('draft')will be true, but draft api wrappers will not be available, leading to errors.lost in the refactor in #1617 (pyzmq 23) where
zmq.DRAFT_API = zmq.has("draft").