summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/requirements.txt6
-rwxr-xr-xdoc/source/conf.py6
-rw-r--r--doc/source/index.rst6
-rw-r--r--doc/source/user/history.rst1
-rw-r--r--lower-constraints.txt6
-rw-r--r--oslo_middleware/base.py8
-rw-r--r--oslo_middleware/cors.py3
-rw-r--r--oslo_middleware/healthcheck/__init__.py10
-rw-r--r--oslo_middleware/healthcheck/__main__.py6
-rw-r--r--oslo_middleware/healthcheck/pluginbase.py5
-rw-r--r--oslo_middleware/tests/test_sizelimit.py13
-rw-r--r--releasenotes/source/conf.py6
-rw-r--r--requirements.txt1
-rw-r--r--test-requirements.txt2
14 files changed, 30 insertions, 49 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 7dcf079..0ece746 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
# These are needed for docs generation
-openstackdocstheme>=1.31.2 # Apache-2.0
-sphinx>=1.8.0,!=2.1.0 # BSD
-reno>=2.5.0 # Apache-2.0
+openstackdocstheme>=2.2.0 # Apache-2.0
+sphinx>=2.0.0,!=2.1.0 # BSD
+reno>=3.1.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 44499e2..af15cf7 100755
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -29,9 +29,9 @@ extensions = [
]
# openstackdocstheme options
-repository_name = 'openstack/oslo.middleware'
-bug_project = 'oslo.middleware'
-bug_tag = ''
+openstackdocs_repo_name = 'openstack/oslo.middleware'
+openstackdocs_bug_project = 'oslo.middleware'
+openstackdocs_bug_tag = ''
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 5bf8ff0..778a677 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -16,7 +16,5 @@ Contents
Release Notes
=============
-.. toctree::
- :maxdepth: 1
-
- user/history
+Read also the `oslo.middleware Release Notes
+<https://docs.openstack.org/releasenotes/oslo.middleware/>`_.
diff --git a/doc/source/user/history.rst b/doc/source/user/history.rst
deleted file mode 100644
index f69be70..0000000
--- a/doc/source/user/history.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../../../ChangeLog
diff --git a/lower-constraints.txt b/lower-constraints.txt
index a9a9af2..c9cfdfe 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -5,16 +5,13 @@ coverage==4.0
debtcollector==1.2.0
extras==1.0.0
fixtures==3.0.0
-flake8==2.5.5
gitdb==0.6.4
GitPython==1.0.1
-hacking==0.12.0
iso8601==0.1.11
Jinja2==2.10
keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
-mccabe==0.2.1
mox3==0.20.0
msgpack-python==0.4.0
netaddr==0.7.18
@@ -27,8 +24,6 @@ oslo.serialization==2.18.0
oslo.utils==3.33.0
oslotest==3.2.0
pbr==2.0.0
-pep8==1.5.7
-pyflakes==0.8.1
pyparsing==2.1.0
python-mimeparse==1.6.0
python-subunit==1.0.0
@@ -37,7 +32,6 @@ PyYAML==3.12
requests==2.14.2
requestsexceptions==1.2.0
rfc3986==0.3.1
-six==1.10.0
smmap==0.9.0
statsd==3.2.1
stestr==2.0.0
diff --git a/oslo_middleware/base.py b/oslo_middleware/base.py
index 29d32e1..f494675 100644
--- a/oslo_middleware/base.py
+++ b/oslo_middleware/base.py
@@ -15,18 +15,12 @@
"""Base class(es) for WSGI Middleware."""
-import six
-
+from inspect import getfullargspec
from oslo_config import cfg
import webob.dec
import webob.request
import webob.response
-if six.PY2:
- from inspect import getargspec as getfullargspec
-else:
- from inspect import getfullargspec
-
class NoContentTypeResponse(webob.response.Response):
diff --git a/oslo_middleware/cors.py b/oslo_middleware/cors.py
index 1fac58a..69fe3d6 100644
--- a/oslo_middleware/cors.py
+++ b/oslo_middleware/cors.py
@@ -18,7 +18,6 @@ import logging
import debtcollector
from oslo_config import cfg
from oslo_middleware import base
-import six
import webob.exc
@@ -209,7 +208,7 @@ class CORS(base.ConfigurableMiddleware):
# NOTE(dims): Support older code that still passes in
# a string for allowed_origin instead of a list
- if isinstance(allowed_origin, six.string_types):
+ if isinstance(allowed_origin, str):
# TODO(krotscheck): https://review.opendev.org/#/c/312687/
LOG.warning('DEPRECATED: The `allowed_origin` keyword argument in '
'`add_origin()` should be a list, found String.')
diff --git a/oslo_middleware/healthcheck/__init__.py b/oslo_middleware/healthcheck/__init__.py
index bd81f0b..66c713e 100644
--- a/oslo_middleware/healthcheck/__init__.py
+++ b/oslo_middleware/healthcheck/__init__.py
@@ -15,6 +15,7 @@
import collections
import gc
+import io
import json
import platform
import socket
@@ -26,7 +27,6 @@ import jinja2
from oslo_utils import reflection
from oslo_utils import strutils
from oslo_utils import timeutils
-import six
import stevedore
import webob.dec
import webob.exc
@@ -395,7 +395,7 @@ Reason
('text/html', self._make_html_response),
('application/json', self._make_json_response),
])
- self._accept_order = tuple(six.iterkeys(self._accept_to_functor))
+ self._accept_order = tuple(self._accept_to_functor)
# When no accept type matches instead of returning 406 we will
# always return text/plain (because sending an error from this
# middleware actually can cause issues).
@@ -437,8 +437,8 @@ Reason
except AttributeError:
pass
else:
- buf = six.StringIO()
- for stack in six.itervalues(active_frames):
+ buf = io.StringIO()
+ for stack in active_frames.values():
traceback.print_stack(stack, file=buf)
threadstacks.append(buf.getvalue())
buf.seek(0)
@@ -449,7 +449,7 @@ Reason
def _get_greenstacks():
greenstacks = []
if greenlet is not None:
- buf = six.StringIO()
+ buf = io.StringIO()
for gt in _find_objects(greenlet.greenlet):
traceback.print_stack(gt.gr_frame, file=buf)
greenstacks.append(buf.getvalue())
diff --git a/oslo_middleware/healthcheck/__main__.py b/oslo_middleware/healthcheck/__main__.py
index 217fff6..6a56410 100644
--- a/oslo_middleware/healthcheck/__main__.py
+++ b/oslo_middleware/healthcheck/__main__.py
@@ -12,15 +12,15 @@
# under the License.
import argparse
+from http import server
+import socketserver
-from six.moves import SimpleHTTPServer # noqa
-from six.moves import socketserver
import webob
from oslo_middleware import healthcheck
-class HttpHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
+class HttpHandler(server.SimpleHTTPRequestHandler):
def do_GET(self):
@webob.dec.wsgify
def dummy_application(req):
diff --git a/oslo_middleware/healthcheck/pluginbase.py b/oslo_middleware/healthcheck/pluginbase.py
index 5bb8494..ddfd940 100644
--- a/oslo_middleware/healthcheck/pluginbase.py
+++ b/oslo_middleware/healthcheck/pluginbase.py
@@ -15,8 +15,6 @@
import abc
-import six
-
class HealthcheckResult(object):
"""Result of a ``healthcheck`` method call should be this object."""
@@ -27,8 +25,7 @@ class HealthcheckResult(object):
self.details = details
-@six.add_metaclass(abc.ABCMeta)
-class HealthcheckBaseExtension(object):
+class HealthcheckBaseExtension(metaclass=abc.ABCMeta):
def __init__(self, oslo_conf, conf):
self.oslo_conf = oslo_conf
diff --git a/oslo_middleware/tests/test_sizelimit.py b/oslo_middleware/tests/test_sizelimit.py
index 3d57a61..5d547ac 100644
--- a/oslo_middleware/tests/test_sizelimit.py
+++ b/oslo_middleware/tests/test_sizelimit.py
@@ -12,9 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
+import io
+
from oslo_config import fixture as config
from oslotest import base as test_base
-import six
import webob
from oslo_middleware import sizelimit
@@ -25,14 +26,14 @@ class TestLimitingReader(test_base.BaseTestCase):
def test_limiting_reader(self):
BYTES = 1024
bytes_read = 0
- data = six.StringIO("*" * BYTES)
+ data = io.StringIO("*" * BYTES)
for chunk in sizelimit.LimitingReader(data, BYTES):
bytes_read += len(chunk)
self.assertEqual(BYTES, bytes_read)
bytes_read = 0
- data = six.StringIO("*" * BYTES)
+ data = io.StringIO("*" * BYTES)
reader = sizelimit.LimitingReader(data, BYTES)
byte = reader.read(1)
while len(byte) != 0:
@@ -44,7 +45,7 @@ class TestLimitingReader(test_base.BaseTestCase):
def test_read_default_value(self):
BYTES = 1024
data_str = "*" * BYTES
- data = six.StringIO(data_str)
+ data = io.StringIO(data_str)
reader = sizelimit.LimitingReader(data, BYTES)
res = reader.read()
self.assertEqual(data_str, res)
@@ -54,7 +55,7 @@ class TestLimitingReader(test_base.BaseTestCase):
def _consume_all_iter():
bytes_read = 0
- data = six.StringIO("*" * BYTES)
+ data = io.StringIO("*" * BYTES)
for chunk in sizelimit.LimitingReader(data, BYTES - 1):
bytes_read += len(chunk)
@@ -63,7 +64,7 @@ class TestLimitingReader(test_base.BaseTestCase):
def _consume_all_read():
bytes_read = 0
- data = six.StringIO("*" * BYTES)
+ data = io.StringIO("*" * BYTES)
reader = sizelimit.LimitingReader(data, BYTES - 1)
byte = reader.read(1)
while len(byte) != 0:
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 7445297..9db72e4 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -39,9 +39,9 @@ extensions = [
]
# openstackdocstheme options
-repository_name = 'openstack/oslo.middleware'
-bug_project = 'oslo.middleware'
-bug_tag = ''
+openstackdocs_repo_name = 'openstack/oslo.middleware'
+openstackdocs_bug_project = 'oslo.middleware'
+openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
diff --git a/requirements.txt b/requirements.txt
index 2304183..147659e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,7 +8,6 @@ oslo.config>=5.2.0 # Apache-2.0
oslo.context>=2.19.2 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
-six>=1.10.0 # MIT
stevedore>=1.20.0 # Apache-2.0
WebOb>=1.8.0 # MIT
debtcollector>=1.2.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 087db15..7f63558 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
fixtures>=3.0.0 # Apache-2.0/BSD
-hacking>=3.0,<3.1.0 # Apache-2.0
+hacking>=3.0.1,<3.1.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testtools>=2.2.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0