From 5e4cf259def7caf7e0a2c3c953277e8e66536e95 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 21 Jul 2017 14:41:33 -0400 Subject: [PATCH 1/2] Fixes #655 -- deprecate OpenSSL.tsafe --- src/OpenSSL/tsafe.py | 7 +++++++ 1 file changed, 7 insertions(+) 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) From 641a9e60ff5c2531286606363ed379ab16f634d8 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 21 Jul 2017 14:42:58 -0400 Subject: [PATCH 2/2] changelog --- CHANGELOG.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: ^^^^^^^^