Răsfoiți Sursa

Avoid mucking with SSL module internals from Dulwich.

Before Python 2.7.9, the `ssl` module lacks SNI support and may lag
behind in security updates. The recommended approach by `urllib3` is to
use pyOpenSSL as a replacement for those versions. It will
issue `InsecurePlatformWarning` and `SNIMissingWarning` when
run on old ssl module versions, allowing the user to take this action.

This avoids a hard dependency on pyopenssl and friends from Dulwich.
Jelmer Vernooij 7 ani în urmă
părinte
comite
af335a0172
1 a modificat fișierele cu 0 adăugiri și 7 ștergeri
  1. 0 7
      dulwich/client.py

+ 0 - 7
dulwich/client.py

@@ -112,13 +112,6 @@ from dulwich.refs import (
     )
 
 
-if sys.version_info < (2, 7, 9):
-    # Before Python 2.7.9 the `ssl` module lacks SNI support and lags behind in
-    # security updates. Use pyOpenSSL instead.
-    import urllib3.contrib.pyopenssl
-    urllib3.contrib.pyopenssl.inject_into_urllib3()
-
-
 def _fileno_can_read(fileno):
     """Check if a file descriptor is readable."""
     return len(select.select([fileno], [], [], 0)[0]) > 0