Here is my example of testing PyZMQ client and server code with pytest and pytest-mock. I haven't found much information on this topic. Anyone else have examples of testing PyZMQ code? https://gavinw.me/pythonic/pyzmq/test-client-server.html

#python #pytest #zeromq #pyzmq

Pythonic Programming

Testing a PyZMQ Client and Server

Maybe I should read about https://pypi.org/project/pyzmq/ #0MQ #pyzmq
Checking #psutil 6.0.0 on #HaikuOS 64bit made me look into what applications actually use it, this led into bumping our packages for #urllib3 and #pyzmq, for #Vorta and #Spyder I couldn't use the latest releases as they depend on packages not available/portable at the moment.
Nevertheless it turned out pretty good. :D
#playground! (nothing in the depot for installations, this should be do-able with pip install ...).
EDIT: a big thanks to @mmu_man for the patch in psutil!

Dzisiejszy ból głowy: #pyzmq sypie się z:

TypeError: '<' not supported between instances of 'str' and 'int'

przy wywołaniu:

./setup.py build_ext -j12

ale tylko w niektórych środowiskach.

Okazało się, że błąd pochodzi z klasy UnixCCompiler nadpisanej przez numpy. Nadpisywanie występuje tylko jeśli Cython i Pythran są dodatkowo zainstalowane (Cython opcjonalnie importuje Pythrana, Pythran importuje numpy.distutils).

Teraz pozostaje jeszcze znaleźć rozwiązanie tego problemu.

https://github.com/zeromq/pyzmq/pull/1872#issuecomment-1571865918

#Gentoo #Python

Call distutils' finalize_options() early to fix build_ext -j… by mgorny · Pull Request #1872 · zeromq/pyzmq

Call the finalize_options() method of overridden distutils commands before running the configure command, in order to fix errors due to unconfigured --jobs option. This can be reproduced by runnin...

GitHub

Today's headache: #pyzmq fails with:

TypeError: '<' not supported between instances of 'str' and 'int'

if you call:

./setup.py build_ext -j12

but only in some environments.

It turned out that the error comes from numpy overriding UnixCCompiler, and the override only happens if both Cython and Pythran are installed in addition to numpy (Cython optonally imports Pythran, and Pythran imports numpy.distutils).

Now how to resolve that…

https://github.com/zeromq/pyzmq/pull/1872#issuecomment-1571865918

#Gentoo #Python

Call distutils' finalize_options() early to fix build_ext -j… by mgorny · Pull Request #1872 · zeromq/pyzmq

Call the finalize_options() method of overridden distutils commands before running the configure command, in order to fix errors due to unconfigured --jobs option. This can be reproduced by runnin...

GitHub