Deprecate tsafe
diff --git a/ChangeLog b/ChangeLog
index 85285b5..d861220 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-22 Jean-Paul Calderone <exarkun@twistedmatrix.com>
+
+ * tsafe.py: Deprecated the thread-safe Connection wrapper, since the
+ basic connection class should be thread-safe now.
+
2008-09-21 Jean-Paul Calderone <exarkun@twistedmatrix.com>
* src/ssl/ssl.h, src/ssl/ssl.c: Add a thread-local storage key
diff --git a/TODO b/TODO
index 0268ea0..cbcf642 100644
--- a/TODO
+++ b/TODO
@@ -3,7 +3,6 @@
* Think more carefully about the relation between X509 and X509_NAME
_set_{subject,issuer} dup the new name and free the old one.
* Consider Pyrex
-* Update tsafe.Connection and make sure the docs are correct
* Updated docs! (rpm, ...)
* _Somehow_ get makefile to work!
* httpslib, imapslib, ftpslib?
diff --git a/tsafe.py b/tsafe.py
index 2b5f1a2..ba7d2e6 100644
--- a/tsafe.py
+++ b/tsafe.py
@@ -8,6 +8,11 @@
class Connection:
def __init__(self, *args):
+ import warnings
+ warnings.warn(
+ "OpenSSL.SSL.Connection is thread-safe. "
+ "OpenSSL.tsafe.Connection is no longer necessary.",
+ stacklevel=2)
self._ssl_conn = apply(_ssl.Connection, args)
self._lock = _RLock()