Skip to content

Commit

Permalink
meta-isar/recipes-python: make zerorpc-python work with pyzmq 23.0.0
Browse files Browse the repository at this point in the history
Pull zerorpc-python submitted upstream (see issue siemens#251) for 0.6.3 to
be compatible with pyzmq 23.0.0

Fixes: siemens#242
Signed-off-by: Cedric Hombourger <[email protected]>
  • Loading branch information
chombourger committed May 20, 2022
1 parent 412037f commit 92686ee
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
License and copyright for files modified by this patch:

SPDX-License-Identifier: MIT
Copyright (c) 2015 François-Xavier Bourlet ([email protected])

From dd6843c114e9bfd6e81abf68f6a2eb3c598d1c2f Mon Sep 17 00:00:00 2001
From: Cedric Hombourger <[email protected]>
Date: Thu, 19 May 2022 22:54:27 +0200
Subject: [PATCH] gevent_zmq: import enums from pyzmq >= 23.0.0

With pyzmq 23.0.0, constants were changed to enums and moved to the
constants module. Attempt to import all globals from it into our zmq
wrapper.

Closes: #251
Signed-off-by: Cedric Hombourger <[email protected]>
---
zerorpc/gevent_zmq.py | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/zerorpc/gevent_zmq.py b/zerorpc/gevent_zmq.py
index 9430695..54420ae 100644
--- a/zerorpc/gevent_zmq.py
+++ b/zerorpc/gevent_zmq.py
@@ -27,6 +27,13 @@
# We want to act like zmq
from zmq import * # noqa

+try:
+ # Try to import enums for pyzmq >= 23.0.0
+ from zmq.constants import * # noqa
+except ImportError:
+ pass
+
+
# Explicit import to please flake8
from zmq import ZMQError

--
2.30.2

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
zerorpc-python (0.6.3-5) testing; urgency=low

* Pull fix submitted upstream for zerorpc to work with pyzmq 23.0.0 (issue #251)

-- Cedric Hombourger <[email protected]> Fri, 20 May 2022 15:30:00 +0100

zerorpc-python (0.6.3-4) testing; urgency=low

* Build-Depends against python3-all-dev
Expand Down
2 changes: 2 additions & 0 deletions meta-isar/recipes-python/zerorpc/zerorpc-python_0.6.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ inherit dpkg

SRC_URI = " \
https://files.pythonhosted.org/packages/73/ff/d61ef9f5d10e671421d1368e87d3525325483ebd7da262b1d3087443662b/zerorpc-${PV}.tar.gz \
file://0001-gevent_zmq-import-enums-from-pyzmq-23.0.0.patch \
file://zerorpc-${PV}/debian \
"

PR = "5"
S = "${WORKDIR}/zerorpc-${PV}"
SRC_URI[sha256sum] = "d2ee247a566fc703f29c277d767f6f61f1e12f76d0402faea4bd815f32cbf37f"

0 comments on commit 92686ee

Please sign in to comment.