From 5c9eb70f6f962fe9e230adb7974b6ccdbf359339 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 12 Apr 2020 18:39:38 +0200 Subject: [PATCH] Cleanup py27 support The repo is now building with py3 only, so remove Py27 support. Change-Id: I6e2eb0b0c31c3dff676241570ebe2f1e852dfc0e --- test-requirements.txt | 4 +--- tools/www-generator.py | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 983ab4741..9ca3a4d63 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,8 +4,7 @@ pbr>=2.0.0,!=2.1.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx>=2.0 # BSD openstack-doc-tools>=1.8.0 # Apache-2.0 Jinja2>=2.10 @@ -13,4 +12,3 @@ Jinja2>=2.10 requests os-service-types lxml!=3.7.0,>=3.4.1 # BSD -six>=1.10.0 # MIT diff --git a/tools/www-generator.py b/tools/www-generator.py index 6d62c165c..0a20ad6f6 100755 --- a/tools/www-generator.py +++ b/tools/www-generator.py @@ -15,7 +15,6 @@ import argparse import logging import os -import six import sys import lxml.html @@ -115,10 +114,7 @@ def main(): os.makedirs(target_directory) logger.debug("writing %s" % target_file) with open(os.path.join(target_file), 'wb') as fh: - if six.PY3: - fh.write(output) - else: - fh.write(output.encode('utf8')) + fh.write(output) except (IOError, OSError, UnicodeEncodeError) as e: logger.error("writing %s failed: %s" % (target_file, e)) raise