Commit a8c1f171 authored by Jason Madden's avatar Jason Madden

Issue a DeprecationWarning when _ssl2.py gets imported.

In preperation for its removal.

Fixes #1305.
parent 40827d83
...@@ -16,8 +16,17 @@ if PY2: ...@@ -16,8 +16,17 @@ if PY2:
# We're just about to import ssl anyway so it's fine to import it here, just # We're just about to import ssl anyway so it's fine to import it here, just
# don't pollute the namespace # don't pollute the namespace
from gevent import _sslgte279 as _source from gevent import _sslgte279 as _source
else: else: # pragma: no cover
from gevent import _ssl2 as _source # pragma: no cover from gevent import _ssl2 as _source
import warnings
warnings.warn(
"This version of Python has an insecure SSL implementation. "
"gevent is no longer tested with it, and support will be removed "
"in gevent 1.5. Please use Python 2.7.9 or newer.",
DeprecationWarning,
stacklevel=2,
)
del warnings
else: else:
# Py3 # Py3
from gevent import _ssl3 as _source # pragma: no cover from gevent import _ssl3 as _source # pragma: no cover
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment