From ce6e345e33f548e902756daf8f91758276ccb22c Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 22 Feb 2016 16:36:46 -0500 Subject: [PATCH] fix SSL/TLS warnings in build The specs build talks to Launchpad to ensure that there is a blueprint for each spec being added to the repository. Those calls emit warnings unless SSL is configured properly, which requires newer SSL libraries than are available in the standard library. Change-Id: I86f8af6ec1f890ebdd260226b0323df8040405a4 Signed-off-by: Doug Hellmann --- doc/source/conf.py | 11 +++++++++++ requirements.txt | 2 ++ 2 files changed, 13 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2b23d6d..e05fd26 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,17 @@ import datetime import os import sys +import warnings + +# Try to only emit warnings about SSL issues one time. +try: + from requests.packages.urllib3 import exceptions + warnings.filterwarnings('ignore', '.*', + exceptions.InsecurePlatformWarning) + warnings.filterwarnings('ignore', '.*', + exceptions.SNIMissingWarning) +except ImportError: + pass sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- diff --git a/requirements.txt b/requirements.txt index 427a7f7..7ee61bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,5 @@ oslosphinx sphinx>=1.1.2,!=1.2.0,<1.3 yasfb>=0.5.0 simplejson>=2.2.0 +pyOpenSSL>=0.14 # Apache-2.0 +pyasn1 # BSD