summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-04-21 11:18:36 +0100
committerStephen Finucane <stephenfin@redhat.com>2020-04-21 15:14:10 +0100
commit1aca4bcbb740e3498fa64b4a6d279b022c74db66 (patch)
tree0436689e65e64fcb9e2fde03e5eca6d39a43e50b
parent08cf225eee889cce2008e327480392c5875f3714 (diff)
downloadstevedore-1aca4bcbb740e3498fa64b4a6d279b022c74db66.tar.gz
Drop Python 2.7 support
Change-Id: I7ae34cb701111adb2968e9b0c153dfd60aeb2fbb Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Sem-Ver: api-break
-rw-r--r--.gitignore2
-rw-r--r--.zuul.yaml2
-rw-r--r--doc/requirements.txt3
-rw-r--r--lower-constraints.txt3
-rw-r--r--releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml4
-rw-r--r--requirements.txt1
-rw-r--r--setup.cfg16
-rw-r--r--setup.py8
-rw-r--r--stevedore/__init__.py1
-rw-r--r--stevedore/example/base.py5
-rw-r--r--stevedore/sphinxext.py2
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini30
13 files changed, 25 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore
index d67fb77..05a8740 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,4 +35,6 @@ AUTHORS
ChangeLog
# reno build
+RELEASENOTES.rst
releasenotes/build
+releasenotes/notes/reno.cache
diff --git a/.zuul.yaml b/.zuul.yaml
index 35eecfd..a60d493 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,10 +1,8 @@
- project:
templates:
- check-requirements
- - lib-forward-testing
- lib-forward-testing-python3
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 3cf3164..701bdb1 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -3,5 +3,4 @@
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
+sphinx>=2.0.0 # BSD
diff --git a/lower-constraints.txt b/lower-constraints.txt
index ea25162..3769f61 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -19,10 +19,9 @@ python-subunit==1.0.0
pytz==2013.6
PyYAML==3.12
requests==2.14.2
-six==1.10.0
smmap==0.9.0
snowballstemmer==1.2.1
-Sphinx==1.6.5
+Sphinx==2.0.0
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
testtools==2.2.0
diff --git a/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml b/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
new file mode 100644
index 0000000..3024edc
--- /dev/null
+++ b/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
@@ -0,0 +1,4 @@
+---
+upgrade:
+ - |
+ Support for Python 2.7 is removed. Python 3.6 or greater is now required.
diff --git a/requirements.txt b/requirements.txt
index a072ac0..6de9f4e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,4 +3,3 @@
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-six>=1.10.0 # MIT
diff --git a/setup.cfg b/setup.cfg
index f6db819..280f9f0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,22 +5,19 @@ author = OpenStack
author-email = openstack-discuss@lists.openstack.org
summary = Manage dynamic plugins for Python applications
home-page = https://docs.openstack.org/stevedore/latest/
+python-requires = >=3.6
classifier =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: Apache Software License
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: Implementation :: CPython
Intended Audience :: Developers
Environment :: Console
-[global]
-setup-hooks =
- pbr.hooks.setup_hook
-
[files]
packages =
stevedore
@@ -30,15 +27,8 @@ stevedore.example.formatter =
simple = stevedore.example.simple:Simple
field = stevedore.example2.fields:FieldList
plain = stevedore.example.simple:Simple
-
stevedore.test.extension =
t1 = stevedore.tests.test_extension:FauxExtension
t2 = stevedore.tests.test_extension:FauxExtension
e1 = stevedore.tests.test_extension:BrokenExtension
e2 = stevedore.tests.notfound:UnimportableExtension
-
-[pbr]
-warnerrors = True
-
-[wheel]
-universal = true
diff --git a/setup.py b/setup.py
index 566d844..f63cc23 100644
--- a/setup.py
+++ b/setup.py
@@ -16,14 +16,6 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
-
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
diff --git a/stevedore/__init__.py b/stevedore/__init__.py
index a471f31..fdf37a9 100644
--- a/stevedore/__init__.py
+++ b/stevedore/__init__.py
@@ -21,4 +21,3 @@ import logging
LOG = logging.getLogger('stevedore')
LOG.addHandler(logging.NullHandler())
-
diff --git a/stevedore/example/base.py b/stevedore/example/base.py
index ec95424..08f8a5c 100644
--- a/stevedore/example/base.py
+++ b/stevedore/example/base.py
@@ -1,10 +1,7 @@
import abc
-import six
-
-@six.add_metaclass(abc.ABCMeta)
-class FormatterBase(object):
+class FormatterBase(metaclass=abc.ABCMeta):
"""Base class for example plugin used in the tutorial.
"""
diff --git a/stevedore/sphinxext.py b/stevedore/sphinxext.py
index 8ca88bb..bdfa023 100644
--- a/stevedore/sphinxext.py
+++ b/stevedore/sphinxext.py
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from __future__ import unicode_literals
-
import inspect
from docutils import nodes
diff --git a/test-requirements.txt b/test-requirements.txt
index bbe4106..11808ac 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -6,7 +6,4 @@ mock>=2.0.0 # BSD
coverage!=4.4,>=4.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
# sphinx is needed for testing the sphinxext module
-sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
-# Bandit security code scanner
-bandit>=1.1.0,<1.6.0 # Apache-2.0
+sphinx>=2.0.0 # BSD
diff --git a/tox.ini b/tox.ini
index b1f4ca8..72dd206 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,18 +1,17 @@
[tox]
-minversion = 2.0
-envlist = py27,py37,pep8,docs
+minversion = 3.2
+envlist = py37,pep8,docs
+ignore_basepython_conflict = true
[testenv]
-install_command = pip install {opts} {packages}
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-distribute = False
commands = stestr run {posargs}
[testenv:venv]
-basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@@ -21,35 +20,31 @@ deps =
commands = {posargs}
[testenv:pep8]
-basepython = python3
deps =
- -r{toxinidir}/test-requirements.txt
- flake8
+ flake8 # MIT
+ bandit>=1.1.0,<1.6.0 # Apache-2.0
ignore = E251
commands =
flake8 stevedore setup.py
# Run security linter
bandit -r stevedore -x tests -n5
-[testenv:docs]
-basepython = python3
-deps = -r{toxinidir}/doc/requirements.txt
-commands = sphinx-build -W -b html doc/source doc/build/html
-
[flake8]
ignore = E251
show-source = True
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
-[testenv:releasenotes]
-basepython = python3
+[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
-commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
+commands = sphinx-build -a -E -W doc/source doc/build/html
+
+[testenv:releasenotes]
+deps = {[testenv:docs]deps}
+commands = sphinx-build -a -E -W releasenotes/source releasenotes/build/html
[testenv:bindep]
-basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
@@ -61,7 +56,6 @@ commands = bindep test
usedevelop = False
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt