File fix_COPY_THRESHOLD.patch of Package python-jupyter_client
From 2840d26e329b1ce6b752943cd2128469a8a481c6 Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Wed, 31 Jan 2018 16:51:41 +0100
Subject: [PATCH] fix testing patch for pyzmq < 17
zmq.COPY_THRESHOLD is undefined prior to pyzmq 17,
so we need `create=True` to define it in that case
---
jupyter_client/tests/test_session.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jupyter_client/tests/test_session.py b/jupyter_client/tests/test_session.py
index e8027436..55181e91 100644
--- a/jupyter_client/tests/test_session.py
+++ b/jupyter_client/tests/test_session.py
@@ -41,7 +41,7 @@ def setUp(self):
@pytest.fixture
def no_copy_threshold():
"""Disable zero-copy optimizations in pyzmq >= 17"""
- with mock.patch.object(zmq, 'COPY_THRESHOLD', 1):
+ with mock.patch.object(zmq, 'COPY_THRESHOLD', 1, create=True):
yield