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

check that buffers are contiguous #258

Merged
merged 3 commits into from
Jul 19, 2017
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented May 8, 2017

zmq.send will fail on non-contiguous buffers

ensures errors due to bad arguments are raise in Session.send instead of potentially delayed to the async callback, which is not handled well.

cf ipython/ipykernel#245

zmq.send will fail on non-contiguous buffers

ensures errors due to bad arguments are raise in `Session.send`
instead of potentially delayed to the aysnc callback,
which is not handled well.
except TypeError:
raise TypeError("Buffer objects must support the buffer protocol.")
if not view.contiguous:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately Python 2.7 doesn't have this attribute:

AttributeError: 'memoryview' object has no attribute 'contiguous'

@takluyver
Copy link
Member

I manually re-ran the Python 2 test build, but the failure appears to be consistent.

since we skip the check there, too
@minrk
Copy link
Member Author

minrk commented Jul 19, 2017

Yup, forgot to also skip the test when I skipped the check on Python 2.

@takluyver takluyver added this to the 5.2 milestone Jul 19, 2017
@takluyver takluyver merged commit 086832c into jupyter:master Jul 19, 2017
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

Successfully merging this pull request may close these issues.

3 participants