socket.setsockopt(zmq.SUBSCRIBE, '') causes test to fail for py3
Description
running test suite of recently released logbook--0.4.1.
The test suite has a patch already to fix py3, a simple one liner. The next remaining and only test failures under py3 occur in attempting to import form zmq
====================================================================== ERROR: test_zeromq_background_thread (logbook.testsuite.test_regular.QueuesTestCase) ----------------------------------------------------------------------
Traceback (most recent call last): File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1322, in test_zeromq_background_thread handler, subscriber = self._get_zeromq() File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1297, in _get_zeromq subscriber = ZeroMQSubscriber(uri) File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_ self.socket.setsockopt(zmq.SUBSCRIBE, '') File "socket.pyx", line 295, in zmq.core.socket.Socket.setsockopt (zmq/core/socket.c:3118) TypeError: unicode not allowed, use setsockopt_string
====================================================================== ERROR: test_zeromq_handler (logbook.testsuite.test_regular.QueuesTestCase) ----------------------------------------------------------------------
Traceback (most recent call last): File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1309, in test_zeromq_handler handler, subscriber = self._get_zeromq() File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1297, in _get_zeromq subscriber = ZeroMQSubscriber(uri) File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_ self.socket.setsockopt(zmq.SUBSCRIBE, '') File "socket.pyx", line 295, in zmq.core.socket.Socket.setsockopt (zmq/core/socket.c:3118) TypeError: unicode not allowed, use setsockopt_string
----------------------------------------------------------------------
Ran 102 tests in 2.629s
FAILED (errors=2)
This looks to be a flaw in zmq. This File "socket.pyx" has me totally confounded. It's not present anywhere in the system, so I really can't decipher where it's drawing File "socket.pyx" even. What's common in both tests is the attempt to read from
self.socket.setsockopt(zmq.SUBSCRIBE, '')
from
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_
It's beyond my scope when it starts citing ghost files. The tests pass fine in py2.
The name possibly derails it in py3.2 with socket.cpython-32.so, however socket.so matches exactly for py2.6 py2.7. Hope you can make snese of it, I can't Do you need a more extensive log?
Environment
gentoo linux, several python versions installed (a gentoo feature)
running test suite of recently released logbook--0.4.1.
The test suite has a patch already to fix py3, a simple one liner.
The next remaining and only test failures under py3 occur in attempting to import form zmq
======================================================================
ERROR: test_zeromq_background_thread (logbook.testsuite.test_regular.QueuesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1322, in test_zeromq_background_thread
handler, subscriber = self._get_zeromq()
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1297, in _get_zeromq
subscriber = ZeroMQSubscriber(uri)
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_
self.socket.setsockopt(zmq.SUBSCRIBE, '')
File "socket.pyx", line 295, in zmq.core.socket.Socket.setsockopt (zmq/core/socket.c:3118)
TypeError: unicode not allowed, use setsockopt_string
======================================================================
ERROR: test_zeromq_handler (logbook.testsuite.test_regular.QueuesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1309, in test_zeromq_handler
handler, subscriber = self._get_zeromq()
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/testsuite/test_regular.py", line 1297, in _get_zeromq
subscriber = ZeroMQSubscriber(uri)
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_
self.socket.setsockopt(zmq.SUBSCRIBE, '')
File "socket.pyx", line 295, in zmq.core.socket.Socket.setsockopt (zmq/core/socket.c:3118)
TypeError: unicode not allowed, use setsockopt_string
----------------------------------------------------------------------
Ran 102 tests in 2.629s
FAILED (errors=2)
This looks to be a flaw in zmq. This File "socket.pyx" has me totally confounded. It's not present anywhere in the system, so I really can't decipher where it's drawing File "socket.pyx" even. What's common in both tests is the attempt to read from
self.socket.setsockopt(zmq.SUBSCRIBE, '')
from
File "/mnt/gen2/TmpDir/portage/dev-python/logbook-0.4.1/work/Logbook-0.4.1-python3_2/lib/logbook/queues.py", line 285, in _init_
It's beyond my scope when it starts citing ghost files.
The tests pass fine in py2.
archtester logbook # qlist pyzmq | grep socket
/usr/lib64/python3.2/site-packages/zmq/tests/test_socket.py
/usr/lib64/python3.2/site-packages/zmq/core/socket.cpython-32.so
/usr/lib64/python3.2/site-packages/zmq/core/socket.pxd
/usr/lib64/python3.2/site-packages/zmq/core/pysocket.py
/usr/lib64/python3.1/site-packages/zmq/tests/test_socket.py
/usr/lib64/python3.1/site-packages/zmq/core/socket.so
/usr/lib64/python3.1/site-packages/zmq/core/socket.pxd
/usr/lib64/python3.1/site-packages/zmq/core/pysocket.py
/usr/lib64/python2.7/site-packages/zmq/tests/test_socket.py
/usr/lib64/python2.7/site-packages/zmq/core/socket.so
/usr/lib64/python2.7/site-packages/zmq/core/socket.pxd
/usr/lib64/python2.7/site-packages/zmq/core/pysocket.py
/usr/lib64/python2.6/site-packages/zmq/tests/test_socket.py
/usr/lib64/python2.6/site-packages/zmq/core/socket.so
/usr/lib64/python2.6/site-packages/zmq/core/socket.pxd
/usr/lib64/python2.6/site-packages/zmq/core/pysocket.py
The name possibly derails it in py3.2 with socket.cpython-32.so, however
socket.so matches exactly for py2.6 py2.7.
Hope you can make snese of it, I can't
Do you need a more extensive log?