From 8aaa668262ad9d11af966925f47d6d79c4fd8aee Mon Sep 17 00:00:00 2001 From: Yuval Brik Date: Sun, 6 Nov 2016 16:12:55 +0200 Subject: [PATCH] Import httplib from six to support Python 3 In Python 3, httplib moved to http.client. Use six in order to import the correct library on both Python 2 and Python 3. Change-Id: I6f43faf453809eed3f2e88fd587e941c80204793 Closes-Bug: #1623447 --- os_api_ref/http_codes.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/os_api_ref/http_codes.py b/os_api_ref/http_codes.py index ad09aef..3258a3b 100644 --- a/os_api_ref/http_codes.py +++ b/os_api_ref/http_codes.py @@ -13,7 +13,7 @@ from docutils import nodes from docutils.parsers.rst.directives.tables import Table from docutils.statemachine import ViewList -from httplib import responses +from six.moves.http_client import responses import yaml # cache for file -> yaml so we only do the load and check of a yaml diff --git a/requirements.txt b/requirements.txt index 893daca..3df30be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,6 @@ pbr>=1.6 # Apache-2.0 PyYAML>=3.10.0 # MIT +six>=1.9.0 # MIT sphinx!=1.3b1,<1.4,>=1.2.1 # BSD openstackdocstheme>=1.5.0 # Apache-2.0