Drop Python 2.7 support

Change-Id: I7ae34cb701111adb2968e9b0c153dfd60aeb2fbb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Sem-Ver: api-break
This commit is contained in:
Stephen Finucane 2020-04-21 11:18:36 +01:00
parent 08cf225eee
commit 1aca4bcbb7
13 changed files with 25 additions and 57 deletions

2
.gitignore vendored
View File

@ -35,4 +35,6 @@ AUTHORS
ChangeLog
# reno build
RELEASENOTES.rst
releasenotes/build
releasenotes/notes/reno.cache

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for Python 2.7 is removed. Python 3.6 or greater is now required.

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -21,4 +21,3 @@ import logging
LOG = logging.getLogger('stevedore')
LOG.addHandler(logging.NullHandler())

View File

@ -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.
"""

View File

@ -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

View File

@ -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

30
tox.ini
View File

@ -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