[pypy-dev] pyzmq fails on sending bytearray on pypy3

Michal Moiseev michal.moiseev at firmitas.solutions
Wed Aug 2 06:02:23 EDT 2017


Hello,
our projects runs on python 3.4, and when trying to run them with pypy3
we run into this problem:
when trying to send bytearray with send()
like:
clientSocket.send(bytearray(some_bytes))
it fails on:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/pypy3-v5.8.0-src/site-packages/zmq/backend/cffi/socket.py",
line 209, in send
    c_message = ffi.new('char[]', message)
  File "/opt/pypy3-v5.8.0-src/lib_pypy/cffi/api.py", line 250, in new
    return self._backend.newp(cdecl, init)
TypeError: 'bytearray' object cannot be interpreted as an integer
it behaves differently when running with python3.4 (Cpython) - which works
i'm not sure if the problem is with the the pyzmq library or the cffi
thank you in advance

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20170802/9e6ec9f0/attachment.html>


More information about the pypy-dev mailing list