From 95a0e0d4325a30e248eaa42579b1501ffd3eaabe Mon Sep 17 00:00:00 2001 From: Sergey Shepelev Date: Sun, 18 Oct 2020 02:06:04 +0300 Subject: [PATCH] patcher: no os.register_at_fork on Windows https://github.com/eventlet/eventlet/issues/644 Eventlet 0.27.0 and 0.28.0 were incompatible with Windows (and other non-Unix) platforms --- eventlet/patcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventlet/patcher.py b/eventlet/patcher.py index a5786379fb..030fa5478c 100644 --- a/eventlet/patcher.py +++ b/eventlet/patcher.py @@ -313,9 +313,9 @@ def monkey_patch(**on): if hasattr(orig_mod, attr_name): delattr(orig_mod, attr_name) - if name == 'threading' and sys.version_info >= (3, 7): + _os = original('os') + if name == 'threading' and hasattr(_os, 'register_at_fork'): def fix_threading_active( - _os=original('os'), _global_dict=original('threading').current_thread.__globals__, _patched=orig_mod ):