Fixes #655 -- deprecate OpenSSL.tsafe (#673)
* Fixes #655 -- deprecate OpenSSL.tsafe
* changelog
diff --git a/src/OpenSSL/tsafe.py b/src/OpenSSL/tsafe.py
index 1cc0d2b..f1c6f67 100644
--- a/src/OpenSSL/tsafe.py
+++ b/src/OpenSSL/tsafe.py
@@ -1,8 +1,15 @@
+import warnings
from threading import RLock as _RLock
from OpenSSL import SSL as _ssl
+warnings.warn(
+ "OpenSSL.tsafe is deprecated and will be removed",
+ DeprecationWarning, stacklevel=3
+)
+
+
class Connection:
def __init__(self, *args):
self._ssl_conn = _ssl.Connection(*args)