diff --git a/CHANGELOG.rst b/CHANGELOG.rst index db6caddac..af2f26d43 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,8 +18,8 @@ Backward-incompatible changes: Deprecations: ^^^^^^^^^^^^^ -*none* - +- Deprecated ``OpenSSL.tsafe``. + `#673 `_ Changes: ^^^^^^^^ diff --git a/src/OpenSSL/tsafe.py b/src/OpenSSL/tsafe.py index 1cc0d2bb0..f1c6f67b3 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)