zeromq / pyzmq

PyZMQ: Python bindings for zeromq
http://zguide.zeromq.org/py:all
BSD 3-Clause "New" or "Revised" License
3.65k stars 637 forks source link

Replace setsockopt() by setsockopt_string() #1921

Closed radeksm closed 8 months ago

radeksm commented 8 months ago

Fix below error: TypeError: unicode not allowed, use setsockopt_string

And remove remaining references to socket.setsockopt() and replace by socket.setsockopt_string().

minrk commented 8 months ago

Thanks for the PR! This is not a correct change, the setsockopt interface is bytes, and most often integers.

If I'm reading correctly, the TypeError is correct, in that if you give unicode you've made an error, and you should be giving it bytes.

radeksm commented 8 months ago

@minrk yeahhh you are correct. Thanks and sorry !