[ussuri][goal] Drop python 2.7 support and testing

OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Cleanup setup.cfg as well.

Increase requests version in lower-constraints:
requests>=2.18.0 is needed by oslo.config, which leads to some other
updates...

Change-Id: I09f0da9a59952739dd1575200aa47cc12026264f
This commit is contained in:
Andreas Jaeger 2020-02-03 16:09:03 +01:00
parent dba465b484
commit 141e7e4209
7 changed files with 16 additions and 37 deletions

View File

@ -60,7 +60,6 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti

View File

@ -1,5 +1,4 @@
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinx>=1.8.0,!=2.1.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
reno>=2.5.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0

View File

@ -17,7 +17,7 @@ flake8==2.5.5
gitdb==0.6.4
GitPython==1.0.1
hacking==0.12.0
idna==2.6
idna==2.5
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
@ -55,7 +55,7 @@ python-mimeparse==1.6.0
python-subunit==1.0.0
pytz==2013.6
PyYAML==3.12
requests==2.14.2
requests==2.18.0
requestsexceptions==1.2.0
rfc3986==0.3.1
six==1.10.0

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The minimum version of Python now
supported by castellan is Python 3.6.

View File

@ -13,4 +13,4 @@ oslo.log>=3.36.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
requests>=2.14.2,!=2.20.0 # Apache-2.0
requests>=2.18.0,!=2.20.0 # Apache-2.0

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/castellan/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,11 +14,11 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
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
[files]
packages =
@ -35,15 +36,6 @@ castellan.drivers =
barbican = castellan.key_manager.barbican_key_manager:BarbicanKeyManager
vault = castellan.key_manager.vault_key_manager:VaultKeyManager
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = castellan/locale
domain = castellan
@ -57,6 +49,3 @@ input_file = castellan/locale/castellan.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = castellan/locale/castellan.pot
[wheel]
universal = 1

21
tox.ini
View File

@ -1,11 +1,12 @@
[tox]
minversion = 2.0
envlist = py27,py37,pep8
minversion = 3.1.1
envlist = py37,pep8
ignore_basepython_conflict = True
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=./castellan/tests/unit
@ -15,17 +16,12 @@ deps =
-r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
commands =
flake8
bandit -r castellan -x tests -s B105,B106,B107,B607
[testenv:bandit]
basepython = python3
# This command runs the bandit security linter against the castellan
# codebase minus the tests directory. Some tests are being excluded to
# reduce the number of positives before a team inspection, and to ensure a
@ -38,15 +34,12 @@ commands =
bandit -r castellan -x tests -s B105,B106,B107,B607
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
@ -60,7 +53,6 @@ commands =
# This environment is called from CI scripts to test and publish
# the main docs to https://docs.openstack.org/castellan
description = Build main documentation
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands=
rm -rf doc/build doc/build/doctrees
@ -68,7 +60,6 @@ commands=
whitelist_externals = rm
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
envdir = {toxworkdir}/docs
whitelist_externals =
@ -80,7 +71,6 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps}
envdir = {toxworkdir}/docs
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -104,7 +94,6 @@ commands =
{toxinidir}/tools/setup-vault-env.sh pifpaf -e VAULT_TEST run vault -- stestr run --slowest {posargs}
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file=etc/castellan/functional-config-generator.conf
oslo-config-generator --config-file=etc/castellan/sample-config-generator.conf
@ -120,14 +109,12 @@ enable-extensions = H106,H203
import_exceptions = castellan.i18n
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[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