[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
Andreas Jaeger
3 years ago
59 | 59 | templates: |
60 | 60 | - check-requirements |
61 | 61 | - openstack-lower-constraints-jobs |
62 | - openstack-python-jobs | |
63 | 62 | - openstack-python3-ussuri-jobs |
64 | 63 | - periodic-stable-jobs |
65 | 64 | - publish-openstack-docs-pti |
0 | sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD | |
1 | sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD | |
0 | sphinx>=1.8.0,!=2.1.0 # BSD | |
2 | 1 | sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD |
3 | 2 | reno>=2.5.0 # Apache-2.0 |
4 | 3 | openstackdocstheme>=1.18.1 # Apache-2.0 |
16 | 16 | gitdb==0.6.4 |
17 | 17 | GitPython==1.0.1 |
18 | 18 | hacking==0.12.0 |
19 | idna==2.6 | |
19 | idna==2.5 | |
20 | 20 | imagesize==0.7.1 |
21 | 21 | iso8601==0.1.11 |
22 | 22 | Jinja2==2.10 |
54 | 54 | python-subunit==1.0.0 |
55 | 55 | pytz==2013.6 |
56 | 56 | PyYAML==3.12 |
57 | requests==2.14.2 | |
57 | requests==2.18.0 | |
58 | 58 | requestsexceptions==1.2.0 |
59 | 59 | rfc3986==0.3.1 |
60 | 60 | six==1.10.0 |
0 | --- | |
1 | upgrade: | |
2 | - | | |
3 | Python 2.7 support has been dropped. The minimum version of Python now | |
4 | supported by castellan is Python 3.6. |
12 | 12 | oslo.utils>=3.33.0 # Apache-2.0 |
13 | 13 | stevedore>=1.20.0 # Apache-2.0 |
14 | 14 | keystoneauth1>=3.4.0 # Apache-2.0 |
15 | requests>=2.14.2,!=2.20.0 # Apache-2.0 | |
15 | requests>=2.18.0,!=2.20.0 # Apache-2.0 |
5 | 5 | author = OpenStack |
6 | 6 | author-email = openstack-discuss@lists.openstack.org |
7 | 7 | home-page = https://docs.openstack.org/castellan/latest/ |
8 | python-requires = >=3.6 | |
8 | 9 | classifier = |
9 | 10 | Environment :: OpenStack |
10 | 11 | Intended Audience :: Information Technology |
12 | 13 | License :: OSI Approved :: Apache Software License |
13 | 14 | Operating System :: POSIX :: Linux |
14 | 15 | Programming Language :: Python |
15 | Programming Language :: Python :: 2 | |
16 | Programming Language :: Python :: 2.7 | |
17 | 16 | Programming Language :: Python :: 3 |
18 | 17 | Programming Language :: Python :: 3.6 |
19 | 18 | Programming Language :: Python :: 3.7 |
19 | Programming Language :: Python :: 3 :: Only | |
20 | Programming Language :: Python :: Implementation :: CPython | |
20 | 21 | |
21 | 22 | [files] |
22 | 23 | packages = |
34 | 35 | barbican = castellan.key_manager.barbican_key_manager:BarbicanKeyManager |
35 | 36 | vault = castellan.key_manager.vault_key_manager:VaultKeyManager |
36 | 37 | |
37 | [build_sphinx] | |
38 | source-dir = doc/source | |
39 | build-dir = doc/build | |
40 | all_files = 1 | |
41 | warning-is-error = 1 | |
42 | ||
43 | [upload_sphinx] | |
44 | upload-dir = doc/build/html | |
45 | ||
46 | 38 | [compile_catalog] |
47 | 39 | directory = castellan/locale |
48 | 40 | domain = castellan |
56 | 48 | keywords = _ gettext ngettext l_ lazy_gettext |
57 | 49 | mapping_file = babel.cfg |
58 | 50 | output_file = castellan/locale/castellan.pot |
59 | ||
60 | [wheel] | |
61 | universal = 1 |
0 | 0 | [tox] |
1 | minversion = 2.0 | |
2 | envlist = py27,py37,pep8 | |
1 | minversion = 3.1.1 | |
2 | envlist = py37,pep8 | |
3 | ignore_basepython_conflict = True | |
3 | 4 | skipsdist = True |
4 | 5 | |
5 | 6 | [testenv] |
6 | 7 | usedevelop = True |
7 | install_command = pip install {opts} {packages} | |
8 | basepython = python3 | |
8 | 9 | setenv = |
9 | 10 | VIRTUAL_ENV={envdir} |
10 | 11 | OS_TEST_PATH=./castellan/tests/unit |
14 | 15 | -r{toxinidir}/test-requirements.txt |
15 | 16 | commands = stestr run --slowest {posargs} |
16 | 17 | |
17 | [testenv:py27] | |
18 | basepython = python2.7 | |
19 | ||
20 | 18 | [testenv:pep8] |
21 | basepython = python3 | |
22 | 19 | commands = |
23 | 20 | flake8 |
24 | 21 | bandit -r castellan -x tests -s B105,B106,B107,B607 |
25 | 22 | |
26 | 23 | [testenv:bandit] |
27 | basepython = python3 | |
28 | 24 | # This command runs the bandit security linter against the castellan |
29 | 25 | # codebase minus the tests directory. Some tests are being excluded to |
30 | 26 | # reduce the number of positives before a team inspection, and to ensure a |
37 | 33 | bandit -r castellan -x tests -s B105,B106,B107,B607 |
38 | 34 | |
39 | 35 | [testenv:venv] |
40 | basepython = python3 | |
41 | 36 | commands = {posargs} |
42 | 37 | |
43 | 38 | [testenv:debug] |
44 | basepython = python3 | |
45 | 39 | commands = oslo_debug_helper {posargs} |
46 | 40 | |
47 | 41 | [testenv:cover] |
48 | basepython = python3 | |
49 | 42 | setenv = |
50 | 43 | PYTHON=coverage run --source $project --parallel-mode |
51 | 44 | commands = |
59 | 52 | # This environment is called from CI scripts to test and publish |
60 | 53 | # the main docs to https://docs.openstack.org/castellan |
61 | 54 | description = Build main documentation |
62 | basepython = python3 | |
63 | 55 | deps = -r{toxinidir}/doc/requirements.txt |
64 | 56 | commands= |
65 | 57 | rm -rf doc/build doc/build/doctrees |
67 | 59 | whitelist_externals = rm |
68 | 60 | |
69 | 61 | [testenv:pdf-docs] |
70 | basepython = python3 | |
71 | 62 | deps = {[testenv:docs]deps} |
72 | 63 | envdir = {toxworkdir}/docs |
73 | 64 | whitelist_externals = |
79 | 70 | make -C doc/build/pdf |
80 | 71 | |
81 | 72 | [testenv:releasenotes] |
82 | basepython = python3 | |
83 | 73 | deps = {[testenv:docs]deps} |
84 | 74 | envdir = {toxworkdir}/docs |
85 | 75 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
103 | 93 | {toxinidir}/tools/setup-vault-env.sh pifpaf -e VAULT_TEST run vault -- stestr run --slowest {posargs} |
104 | 94 | |
105 | 95 | [testenv:genconfig] |
106 | basepython = python3 | |
107 | 96 | commands = |
108 | 97 | oslo-config-generator --config-file=etc/castellan/functional-config-generator.conf |
109 | 98 | oslo-config-generator --config-file=etc/castellan/sample-config-generator.conf |
119 | 108 | import_exceptions = castellan.i18n |
120 | 109 | |
121 | 110 | [testenv:lower-constraints] |
122 | basepython = python3 | |
123 | 111 | deps = |
124 | 112 | -c{toxinidir}/lower-constraints.txt |
125 | 113 | -r{toxinidir}/test-requirements.txt |
126 | 114 | -r{toxinidir}/requirements.txt |
127 | 115 | |
128 | 116 | [testenv:bindep] |
129 | basepython = python3 | |
130 | 117 | # Do not install any requirements. We want this to be fast and work even if |
131 | 118 | # system dependencies are missing, since it's used to tell you what system |
132 | 119 | # dependencies are missing! This also means that bindep must be installed |