Skip to content

Commit a1cd624

Browse files
committed
PYTHON-2921 Fix eventlet detection with Python 3.10 (#744)
(cherry picked from commit 1115522)
1 parent 34453c2 commit a1cd624

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/utils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -930,13 +930,9 @@ def gevent_monkey_patched():
930930

931931
def eventlet_monkey_patched():
932932
"""Check if eventlet's monkey patching is active."""
933-
try:
934-
import threading
935-
import eventlet
936-
return (threading.current_thread.__module__ ==
937-
'eventlet.green.threading')
938-
except ImportError:
939-
return False
933+
import threading
934+
return (threading.current_thread.__module__ ==
935+
'eventlet.green.threading')
940936

941937

942938
def is_greenthread_patched():

0 commit comments

Comments
 (0)