Skip to content

Commit

Permalink
greendns: Patch ssl
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tipabu authored and temoto committed Mar 3, 2021
1 parent a21539d commit 79cf4ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eventlet/support/greendns.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from eventlet.green import os
from eventlet.green import time
from eventlet.green import select
from eventlet.green import ssl
import six


Expand All @@ -55,6 +56,7 @@ def import_patched(module_name):
'time': time,
'os': os,
'socket': _socket_nodns,
'ssl': ssl,
}
return patcher.import_patched(module_name, **modules)

Expand Down

0 comments on commit 79cf4ea

Please sign in to comment.