Skip to content

Commit 1115522

Browse files
authored
PYTHON-2921 Fix eventlet detection with Python 3.10 (#744)
1 parent c380852 commit 1115522

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
@@ -918,13 +918,9 @@ def gevent_monkey_patched():
918918

919919
def eventlet_monkey_patched():
920920
"""Check if eventlet's monkey patching is active."""
921-
try:
922-
import threading
923-
import eventlet
924-
return (threading.current_thread.__module__ ==
925-
'eventlet.green.threading')
926-
except ImportError:
927-
return False
921+
import threading
922+
return (threading.current_thread.__module__ ==
923+
'eventlet.green.threading')
928924

929925

930926
def is_greenthread_patched():

0 commit comments

Comments
 (0)