From dfbec0e607c735b0144474de281e3ec6b259ac3b Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 12 Apr 2018 13:01:48 +0300 Subject: [PATCH 1/2] Fix fetching of unpatched threading primitives (closes #258) --- logbook/concurrency.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/logbook/concurrency.py b/logbook/concurrency.py index b7a6758a..2f15f438 100644 --- a/logbook/concurrency.py +++ b/logbook/concurrency.py @@ -28,10 +28,12 @@ def is_gevent_enabled(): if has_gevent: - from gevent._threading import (Lock as ThreadLock, - RLock as ThreadRLock, - get_ident as thread_get_ident, - local as thread_local) + from gevent.monkey import get_original as _get_original + Lock = _get_original('threading', 'Lock') + RLock = _get_original('threading', 'RLock') + get_ident = _get_original('threading', 'get_ident') + local = _get_original('threading', 'local') + from gevent.thread import get_ident as greenlet_get_ident from gevent.local import local as greenlet_local from gevent.lock import BoundedSemaphore From 224091731987fdeba0ef122a5a47a5a461d5a17a Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 12 Apr 2018 13:08:29 +0300 Subject: [PATCH 2/2] Bump version --- logbook/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logbook/__version__.py b/logbook/__version__.py index 67bc602a..9c73af26 100644 --- a/logbook/__version__.py +++ b/logbook/__version__.py @@ -1 +1 @@ -__version__ = "1.3.0" +__version__ = "1.3.1"