summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2020-10-19 20:09:37 +0300
committerGitHub <noreply@github.com>2020-10-19 10:09:37 -0700
commitf227ef649b27de1c30660a2ab7858021ff7f549e (patch)
tree64d7227476e3f958be75d10c73d4aca2c2e811e4
parentf2ebbb87590d0fa4f173599806dfec88caeb9fb9 (diff)
downloadeventlet-f227ef649b27de1c30660a2ab7858021ff7f549e.tar.gz
patcher: no os.register_at_fork on Windows (#654)
https://github.com/eventlet/eventlet/issues/644 Eventlet 0.27.0 and 0.28.0 were incompatible with Windows (and other non-Unix) platforms
-rw-r--r--eventlet/patcher.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/eventlet/patcher.py b/eventlet/patcher.py
index a578637..030fa54 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
):