Skip to content

Commit 79cf4ea

Browse files
tipabutemoto
authored andcommitted
greendns: Patch ssl
Newer (2.0+) dnspython imports ssl (and requests, which would have eventually imported ssl), so greendns needs a monkey-patched ssl, too. This should prevent a RecursionError with SSLContext. Note that this *does not* bring full dnspython>=2.0 support, but our version pin hasn't stopped people from trying to run with newer dnspython anyway. May as well make it hurt a little less. Fixes #677, but see also #619.
1 parent a21539d commit 79cf4ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

eventlet/support/greendns.py

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from eventlet.green import os
4343
from eventlet.green import time
4444
from eventlet.green import select
45+
from eventlet.green import ssl
4546
import six
4647

4748

@@ -55,6 +56,7 @@ def import_patched(module_name):
5556
'time': time,
5657
'os': os,
5758
'socket': _socket_nodns,
59+
'ssl': ssl,
5860
}
5961
return patcher.import_patched(module_name, **modules)
6062

0 commit comments

Comments
 (0)