forked from siemens/mtda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-isar/recipes-python: make zerorpc-python work with pyzmq 23.0.0
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
1 parent
412037f
commit 92686ee
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
meta-isar/recipes-python/zerorpc/files/0001-gevent_zmq-import-enums-from-pyzmq-23.0.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
6 changes: 6 additions & 0 deletions
6
meta-isar/recipes-python/zerorpc/files/zerorpc-0.6.3/debian/changelog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters