[ussuri][goal] Drop python2.7 support
As per the official python support timeline set forth by the OpenStack TC [1][2], OpenStack Train (in our case, manila 9.x) is the last release that will support python2.7. [1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Change-Id: I5b4dc1853d7e4f8f736dd2a22eb08bcfdeac3411
This commit is contained in:
parent
de89e12489
commit
cb95b6f6f5
17
.zuul.yaml
17
.zuul.yaml
@ -3,8 +3,7 @@
|
|||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-lower-constraints-jobs
|
- openstack-lower-constraints-jobs
|
||||||
- openstack-python-jobs
|
- openstack-python3-ussuri-jobs
|
||||||
- openstack-python3-train-jobs
|
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
- periodic-stable-jobs
|
- periodic-stable-jobs
|
||||||
@ -32,8 +31,6 @@
|
|||||||
- manila-tempest-dsvm-glusterfs-native:
|
- manila-tempest-dsvm-glusterfs-native:
|
||||||
voting: false
|
voting: false
|
||||||
- manila-tempest-minimal-dsvm-dummy
|
- manila-tempest-minimal-dsvm-dummy
|
||||||
# Through the Train release we need to keep some python2 coverage.
|
|
||||||
- manila-tempest-minimal-dsvm-dummy-py2
|
|
||||||
- manila-tempest-minimal-dsvm-lvm
|
- manila-tempest-minimal-dsvm-lvm
|
||||||
- manila-tempest-minimal-lvm-ipv6-only
|
- manila-tempest-minimal-lvm-ipv6-only
|
||||||
- manila-grenade:
|
- manila-grenade:
|
||||||
@ -330,18 +327,6 @@
|
|||||||
- openstack/python-manilaclient
|
- openstack/python-manilaclient
|
||||||
- openstack/tempest
|
- openstack/tempest
|
||||||
|
|
||||||
- job:
|
|
||||||
name: manila-tempest-minimal-dsvm-dummy-py2
|
|
||||||
parent: manila-tempest-base
|
|
||||||
run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml
|
|
||||||
post-run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml
|
|
||||||
required-projects:
|
|
||||||
- openstack/devstack-gate
|
|
||||||
- openstack/manila
|
|
||||||
- openstack/manila-tempest-plugin
|
|
||||||
- openstack/python-manilaclient
|
|
||||||
- openstack/tempest
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: manila-tempest-minimal-dsvm-lvm
|
name: manila-tempest-minimal-dsvm-lvm
|
||||||
parent: manila-tempest-base
|
parent: manila-tempest-base
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||||
reno>=2.5.0 # Apache-2.0
|
reno>=2.5.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.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!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
os-api-ref>=1.4.0 # Apache-2.0
|
os-api-ref>=1.4.0 # Apache-2.0
|
||||||
|
@ -70,7 +70,7 @@ of your manila's tox. Prior to running the above command, run:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ source .tox/py27/bin/activate
|
$ source .tox/py3/bin/activate
|
||||||
|
|
||||||
Or directly as a one-liner, with:
|
Or directly as a one-liner, with:
|
||||||
|
|
||||||
|
@ -134,7 +134,6 @@ Run the unit tests with::
|
|||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
tox -epy27
|
|
||||||
tox -epy36
|
tox -epy36
|
||||||
|
|
||||||
See :doc:`unit_tests` for more details.
|
See :doc:`unit_tests` for more details.
|
||||||
@ -146,10 +145,6 @@ Manually installing and using the virtualenv
|
|||||||
|
|
||||||
You can also manually install the virtual environment::
|
You can also manually install the virtual environment::
|
||||||
|
|
||||||
tox -epy27 --notest
|
|
||||||
|
|
||||||
or::
|
|
||||||
|
|
||||||
tox -epy36 --notest
|
tox -epy36 --notest
|
||||||
|
|
||||||
This will install all of the Python packages listed in the
|
This will install all of the Python packages listed in the
|
||||||
@ -157,10 +152,6 @@ This will install all of the Python packages listed in the
|
|||||||
|
|
||||||
To activate the Manila virtualenv you can run::
|
To activate the Manila virtualenv you can run::
|
||||||
|
|
||||||
$ source .tox/py27/bin/activate
|
|
||||||
|
|
||||||
or::
|
|
||||||
|
|
||||||
$ source .tox/py36/bin/activate
|
$ source .tox/py36/bin/activate
|
||||||
|
|
||||||
To exit your virtualenv, just type::
|
To exit your virtualenv, just type::
|
||||||
|
@ -17,9 +17,9 @@ This will create a virtual environment, load all the packages from
|
|||||||
test-requirements.txt and run all unit tests as well as run flake8 and hacking
|
test-requirements.txt and run all unit tests as well as run flake8 and hacking
|
||||||
checks against the code.
|
checks against the code.
|
||||||
|
|
||||||
You may run individual test targets, for example only py27 tests, by running::
|
You may run individual test targets, for example only unit tests, by running::
|
||||||
|
|
||||||
tox -e py27
|
tox -e py3
|
||||||
|
|
||||||
Note that you can inspect the tox.ini file to get more details on the available
|
Note that you can inspect the tox.ini file to get more details on the available
|
||||||
options and what the test run does by default.
|
options and what the test run does by default.
|
||||||
@ -31,17 +31,17 @@ class, or method that contains test code.
|
|||||||
|
|
||||||
To run the tests in the ``manila/tests/scheduler`` directory::
|
To run the tests in the ``manila/tests/scheduler`` directory::
|
||||||
|
|
||||||
tox -epy27 -- manila.tests.scheduler
|
tox -epy3 -- manila.tests.scheduler
|
||||||
|
|
||||||
To run the tests in the `ShareManagerTestCase` class in
|
To run the tests in the `ShareManagerTestCase` class in
|
||||||
``manila/tests/share/test_manager.py``::
|
``manila/tests/share/test_manager.py``::
|
||||||
|
|
||||||
tox -epy27 -- manila.tests.share.test_manager.ShareManagerTestCase
|
tox -epy3 -- manila.tests.share.test_manager.ShareManagerTestCase
|
||||||
|
|
||||||
To run the `ShareManagerTestCase::test_share_manager_instance` test method in
|
To run the `ShareManagerTestCase::test_share_manager_instance` test method in
|
||||||
``manila/tests/share/test_manager.py``::
|
``manila/tests/share/test_manager.py``::
|
||||||
|
|
||||||
tox -epy27 -- manila.tests.share.test_manager.ShareManagerTestCase.test_share_manager_instance
|
tox -epy3 -- manila.tests.share.test_manager.ShareManagerTestCase.test_share_manager_instance
|
||||||
|
|
||||||
For more information on these options and details about stestr, please see the
|
For more information on these options and details about stestr, please see the
|
||||||
`stestr documentation <http://stestr.readthedocs.io/en/latest/MANUAL.html>`_.
|
`stestr documentation <http://stestr.readthedocs.io/en/latest/MANUAL.html>`_.
|
||||||
|
@ -44,7 +44,6 @@ so the only package you install is ``tox`` itself::
|
|||||||
Run the unit tests by doing::
|
Run the unit tests by doing::
|
||||||
|
|
||||||
tox -e py3
|
tox -e py3
|
||||||
tox -e py27
|
|
||||||
|
|
||||||
Tests and assertRaises
|
Tests and assertRaises
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
- hosts: primary
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=/logs/**
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
@ -1,82 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
name: Autoconverted job manila-tempest-minimal-dsvm-dummy-py2 from old job gate-manila-tempest-minimal-dsvm-dummy-ubuntu-xenial
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Ensure legacy workspace directory
|
|
||||||
file:
|
|
||||||
path: '{{ ansible_user_dir }}/workspace'
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
cat > clonemap.yaml << EOF
|
|
||||||
clonemap:
|
|
||||||
- name: openstack/devstack-gate
|
|
||||||
dest: devstack-gate
|
|
||||||
EOF
|
|
||||||
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
|
|
||||||
https://opendev.org \
|
|
||||||
openstack/devstack-gate
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace'
|
|
||||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
||||||
|
|
||||||
- shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
cat << 'EOF' >>"/tmp/dg-local.conf"
|
|
||||||
[[local|localrc]]
|
|
||||||
enable_plugin manila https://opendev.org/openstack/manila
|
|
||||||
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
|
|
||||||
EOF
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace'
|
|
||||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
||||||
|
|
||||||
- shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
export PYTHONUNBUFFERED=true
|
|
||||||
export DEVSTACK_GATE_NEUTRON=1
|
|
||||||
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
|
|
||||||
# Basic services needed for minimal job
|
|
||||||
export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest,tls-proxy
|
|
||||||
|
|
||||||
# Keep localrc to be able to set some vars in pre_test_hook
|
|
||||||
export KEEP_LOCALRC=1
|
|
||||||
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
|
|
||||||
export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False
|
|
||||||
|
|
||||||
function pre_test_hook {
|
|
||||||
# 'dhss' - acronym for 'Driver Handles Share Servers',
|
|
||||||
# defines mode of a share driver. Boolean-like.
|
|
||||||
# 'driver' - codename of a share driver to configure.
|
|
||||||
# 'back_end_type' - defines which installation Manila should
|
|
||||||
# have - either 'singlebackend' or 'multibackend'.
|
|
||||||
source $BASE/new/manila/contrib/ci/pre_test_hook.sh False dummy multibackend
|
|
||||||
}
|
|
||||||
export -f pre_test_hook
|
|
||||||
|
|
||||||
function post_test_hook {
|
|
||||||
# 'back_end_type' - defines which installation Manila is
|
|
||||||
# configured to - either 'singlebackend' or 'multibackend'.
|
|
||||||
# 'driver' - codename of a share driver that is configured in
|
|
||||||
# Manila. It is used for enabling/disabling tests that are not
|
|
||||||
# supported by share driver that is used.
|
|
||||||
# 'test_type' - defines which set of test suites should be used,
|
|
||||||
# can have 'api' and 'scenario' values.
|
|
||||||
# 'postgres_enabled' - set of test suites depends on DB backend
|
|
||||||
# in some cases, so it is provided explicitely. Boolean-like.
|
|
||||||
source $BASE/new/manila/contrib/ci/post_test_hook.sh multibackend dummy api False
|
|
||||||
}
|
|
||||||
export -f post_test_hook
|
|
||||||
|
|
||||||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
|
||||||
./safe-devstack-vm-gate-wrap.sh
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace'
|
|
||||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Python 2.7 support has been dropped. Last release of openstack/manila to
|
||||||
|
support python 2.7 is OpenStack Train (9.x). The minimum version of
|
||||||
|
Python now supported by openstack/manila is Python 3.6.
|
@ -13,8 +13,6 @@ classifier =
|
|||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
Programming Language :: Python :: 2
|
|
||||||
Programming Language :: Python :: 2.7
|
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.6
|
Programming Language :: Python :: 3.6
|
||||||
Programming Language :: Python :: 3.7
|
Programming Language :: Python :: 3.7
|
||||||
|
26
tox.ini
26
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = py3,py27,pep8
|
envlist = py3,pep8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
@ -16,7 +17,6 @@ commands =
|
|||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@ -28,20 +28,10 @@ commands =
|
|||||||
whitelist_externals = rm
|
whitelist_externals = rm
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
|
||||||
commands = oslo_debug_helper {posargs}
|
|
||||||
|
|
||||||
[testenv:debug-py27]
|
|
||||||
basepython = python2.7
|
|
||||||
commands = oslo_debug_helper {posargs}
|
|
||||||
|
|
||||||
[testenv:debug-py3]
|
|
||||||
basepython = python3
|
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
# Let's gate pep8 under py3 by default because the py3 checks are stricter.
|
# Let's gate pep8 under py3 by default because the py3 checks are stricter.
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
# Run bashate during pep8 runs to ensure violations are caught by
|
# Run bashate during pep8 runs to ensure violations are caught by
|
||||||
@ -62,21 +52,17 @@ commands =
|
|||||||
{toxinidir}/tools/check_logging.sh {toxinidir}/manila
|
{toxinidir}/tools/check_logging.sh {toxinidir}/manila
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
basepython = python3
|
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
|
oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
|
||||||
|
|
||||||
[testenv:genpolicy]
|
[testenv:genpolicy]
|
||||||
basepython = python3
|
|
||||||
commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
|
commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
@ -89,7 +75,6 @@ commands =
|
|||||||
whitelist_externals = rm
|
whitelist_externals = rm
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
make
|
make
|
||||||
@ -104,13 +89,11 @@ commands =
|
|||||||
# separately, outside of the requirements files, and develop mode disabled
|
# separately, outside of the requirements files, and develop mode disabled
|
||||||
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
||||||
# further relies on "tox.skipsdist = True" above).
|
# further relies on "tox.skipsdist = True" above).
|
||||||
basepython = python3
|
|
||||||
deps = bindep
|
deps = bindep
|
||||||
commands = bindep test
|
commands = bindep test
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
PYTHON=coverage run --source manila --parallel-mode
|
PYTHON=coverage run --source manila --parallel-mode
|
||||||
@ -119,12 +102,10 @@ commands =
|
|||||||
|
|
||||||
[testenv:fast8]
|
[testenv:fast8]
|
||||||
# Let's run fast8 under py3 by default because the py3 checks are stricter.
|
# Let's run fast8 under py3 by default because the py3 checks are stricter.
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/fast8.sh
|
{toxinidir}/tools/fast8.sh
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
pylint==2.3.1
|
pylint==2.3.1
|
||||||
@ -132,7 +113,6 @@ whitelist_externals = bash
|
|||||||
commands = bash ./tools/coding-checks.sh --pylint {posargs}
|
commands = bash ./tools/coding-checks.sh --pylint {posargs}
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
basepython = python3
|
|
||||||
# This environment is called from CI scripts to test and publish
|
# This environment is called from CI scripts to test and publish
|
||||||
# the API Ref to docs.openstack.org.
|
# the API Ref to docs.openstack.org.
|
||||||
whitelist_externals = rm
|
whitelist_externals = rm
|
||||||
@ -142,7 +122,6 @@ commands =
|
|||||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||||
|
|
||||||
[testenv:dbrevision]
|
[testenv:dbrevision]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs}
|
commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs}
|
||||||
|
|
||||||
@ -163,7 +142,6 @@ import_exceptions =
|
|||||||
local-check-factory = manila.hacking.checks.factory
|
local-check-factory = manila.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{toxinidir}/lower-constraints.txt
|
-c{toxinidir}/lower-constraints.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user