From 4f2471200ccc856342935d24230c990b393886d8 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Wed, 17 Aug 2016 14:48:58 +1200 Subject: [PATCH] Document the new pyOpenSSL check. The error emitted when the version is wrong now links to the docs. --HG-- branch : stable --- doc/src/index.rst | 12 ++++++++++++ doc/src/releases.rst | 14 ++++++++++++++ imapclient/tls.py | 6 ++++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/src/index.rst b/doc/src/index.rst index 133eeab..7646a75 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -175,6 +175,18 @@ The above examples show some of the most common TLS parameter customisations but there are many other tweaks are possible. Consult the Python 3 :py:mod:`ssl` package documentation for further options. +Old pyOpenSSL Versions ++++++++++++++++++++++++ + +IMAPClient's TLS functionality will not behaviour correctly if an +out-of-date version of pyOpenSSL is used. On some systems +(particularly OS X) the system installed version of pyOpenSSL will +take precedence over any user installed version. Use of virtualenvs is +strongly encouraged to work around this. + +IMAPClient checks the installed pyOpenSSL version at import time and +will fail early if an old pyOpenSSL version is found. + Using gevent with IMAPClient ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Some extra monkey patching is required so that the gevent_ package can diff --git a/doc/src/releases.rst b/doc/src/releases.rst index 21d9b2b..8850c01 100644 --- a/doc/src/releases.rst +++ b/doc/src/releases.rst @@ -1,5 +1,19 @@ :tocdepth: 1 +=============== + Version 1.0.2 +=============== + +Changed +------- +- Explicitly check that the required pyOpenSSL version is installed +- Start testing against Python 3.5 +- Update doc links from readthedocs.org to readthedocs.io + +Fixed +----- +- Allow installation from alternate directories + =============== Version 1.0.1 =============== diff --git a/imapclient/tls.py b/imapclient/tls.py index 3611d73..617b351 100644 --- a/imapclient/tls.py +++ b/imapclient/tls.py @@ -25,8 +25,10 @@ def check_pyopenssl_version(): from .version import min_pyopenssl_version if V(installed_pyopenssl_version) < V(min_pyopenssl_version): - raise ImportError("pyOpenSSL version (%s) is too old. Need at least %s." - % (installed_pyopenssl_version, min_pyopenssl_version)) + raise ImportError( + "pyOpenSSL version (%s) is too old. Need at least %s.\n" + "See http://imapclient.rtfd.io/#old-pyopenssl-versions" + % (installed_pyopenssl_version, min_pyopenssl_version)) check_pyopenssl_version() -- 2.43.0