diff --git a/.zuul.yaml b/.zuul.yaml index 01f540e4..1038c5e2 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -20,32 +20,10 @@ - openstack/python-blazarclient - openstack/blazar-tempest-plugin -- job: - name: blazar-devstack-dsvm-py35 - parent: legacy-dsvm-base - irrelevant-files: - - ^.*\.rst$ - - ^blazar/tests/.*$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^tools/.*$ - - ^tox.ini$ - run: playbooks/legacy/blazar-devstack-dsvm-py35/run.yaml - post-run: playbooks/legacy/blazar-devstack-dsvm-py35/post.yaml - timeout: 4200 - required-projects: - - openstack/devstack - - openstack/devstack-gate - - openstack/blazar - - openstack/blazar-nova - - openstack/python-blazarclient - - openstack/blazar-tempest-plugin - - job: name: blazar-devstack-dsvm-ipv6-only - parent: blazar-devstack-dsvm-py35 - run: playbooks/legacy/blazar-devstack-dsvm-py35/run-ipv6.yaml + parent: blazar-devstack-dsvm + run: playbooks/legacy/blazar-devstack-dsvm/run-ipv6.yaml required-projects: - openstack/tempest @@ -54,14 +32,12 @@ - check-requirements - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: jobs: - blazar-devstack-dsvm - - blazar-devstack-dsvm-py35 - blazar-devstack-dsvm-ipv6-only - openstack-tox-pylint: voting: false @@ -69,5 +45,4 @@ queue: blazar jobs: - blazar-devstack-dsvm - - blazar-devstack-dsvm-py35 - blazar-devstack-dsvm-ipv6-only diff --git a/playbooks/legacy/blazar-devstack-dsvm-py35/post.yaml b/playbooks/legacy/blazar-devstack-dsvm-py35/post.yaml deleted file mode 100644 index e07f5510..00000000 --- a/playbooks/legacy/blazar-devstack-dsvm-py35/post.yaml +++ /dev/null @@ -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 diff --git a/playbooks/legacy/blazar-devstack-dsvm-py35/run.yaml b/playbooks/legacy/blazar-devstack-dsvm-py35/run.yaml deleted file mode 100644 index 317ca36d..00000000 --- a/playbooks/legacy/blazar-devstack-dsvm-py35/run.yaml +++ /dev/null @@ -1,65 +0,0 @@ -- hosts: all - name: legacy-blazar-devstack-dsvm-py35 - 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 blazar https://opendev.org/openstack/blazar - # Swift is not ready for python3 yet - disable_service s-account - disable_service s-container - disable_service s-object - disable_service s-proxy - # Without Swift, c-bak cannot run (in the Gate at least) - disable_service c-bak - # Enable Tempest plugin - TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin' - EOF - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - export DEVSTACK_GATE_USE_PYTHON3=True - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=1 - export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest - export PROJECTS="openstack/blazar $PROJECTS" - export PROJECTS="openstack/blazar-nova $PROJECTS" - export PROJECTS="openstack/python-blazarclient $PROJECTS" - export PROJECTS="openstack/blazar-tempest-plugin $PROJECTS" - export DEVSTACK_GATE_TEMPEST_REGEX="blazar_tempest_plugin" - export TEMPEST_CONCURRENCY=1 - 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 }}' diff --git a/playbooks/legacy/blazar-devstack-dsvm-py35/run-ipv6.yaml b/playbooks/legacy/blazar-devstack-dsvm/run-ipv6.yaml similarity index 100% rename from playbooks/legacy/blazar-devstack-dsvm-py35/run-ipv6.yaml rename to playbooks/legacy/blazar-devstack-dsvm/run-ipv6.yaml diff --git a/playbooks/legacy/blazar-devstack-dsvm/run.yaml b/playbooks/legacy/blazar-devstack-dsvm/run.yaml index d6fad587..317ca36d 100644 --- a/playbooks/legacy/blazar-devstack-dsvm/run.yaml +++ b/playbooks/legacy/blazar-devstack-dsvm/run.yaml @@ -1,5 +1,5 @@ - hosts: all - name: Autoconverted job legacy-blazar-devstack-dsvm from old job gate-blazar-devstack-dsvm + name: legacy-blazar-devstack-dsvm-py35 tasks: - name: Ensure legacy workspace directory @@ -30,6 +30,13 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin blazar https://opendev.org/openstack/blazar + # Swift is not ready for python3 yet + disable_service s-account + disable_service s-container + disable_service s-object + disable_service s-proxy + # Without Swift, c-bak cannot run (in the Gate at least) + disable_service c-bak # Enable Tempest plugin TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin' EOF @@ -41,6 +48,7 @@ cmd: | set -e set -x + export DEVSTACK_GATE_USE_PYTHON3=True export PYTHONUNBUFFERED=true export DEVSTACK_GATE_TEMPEST=1 export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest diff --git a/releasenotes/notes/drop-python2-support-148148077280122c.yaml b/releasenotes/notes/drop-python2-support-148148077280122c.yaml new file mode 100644 index 00000000..82c3d81c --- /dev/null +++ b/releasenotes/notes/drop-python2-support-148148077280122c.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The last release of Blazar supporting + Python 2.7 is OpenStack Train. The minimum version of Python now supported + by Blazar is Python 3.6. diff --git a/setup.cfg b/setup.cfg index a0deefb0..1c8ea2ac 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,8 +5,6 @@ description-file = README.rst license = Apache Software License classifiers = 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 diff --git a/tox.ini b/tox.ini index d51593c6..fa69a113 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,11 @@ [tox] -envlist = py27,py36,py37,pep8 -minversion = 2.0 +envlist = py36,py37,pep8 +minversion = 3.1.1 skipsdist = True +ignore_basepython_conflict = True [testenv] +basepython = python3 usedevelop = True whitelist_externals = rm install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} @@ -18,7 +20,6 @@ commands = sitepackages = False [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source blazar --parallel-mode @@ -31,15 +32,12 @@ commands = coverage report [testenv:pep8] -basepython = python3 commands = flake8 {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -50,7 +48,6 @@ commands = python setup.py build_sphinx [testenv:pdf-docs] -basepython = python3 deps = {[testenv:docs]deps} whitelist_externals = make commands = @@ -58,7 +55,6 @@ commands = make -C doc/build/pdf [testenv:genconfig] -basepython = python3 commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf [flake8] @@ -78,17 +74,14 @@ max-complexity=17 local-check-factory = blazar.hacking.checks.factory [testenv:pylint] -basepython = python3 deps = -r{toxinidir}/requirements.txt pylint==1.9.1 commands = pylint blazar [testenv:releasenotes] -basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:api-ref] -basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to docs.openstack.org. commands = @@ -100,7 +93,6 @@ commands = oslopolicy-sample-generator --config-file etc/blazar/blazar-policy-generator.conf [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt @@ -109,7 +101,6 @@ deps = # This environment can be used to quickly validate that all needed system # packages required to successfully execute test targets are installed [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