diff --git a/.zuul.yaml b/.zuul.yaml index 35282dc2..07482ef2 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -13,15 +13,15 @@ - project: templates: - openstack-cover-jobs - - openstack-python-jobs - docs-on-readthedocs + - openstack-python35-jobs - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs vars: rtd_webhook_id: '38572' rtd_project_name: 'airship-deckhand' check: jobs: - - deckhand-tox-py27-postgresql - deckhand-tox-py35-postgresql - deckhand-functional-uwsgi-py35: voting: false @@ -40,13 +40,13 @@ - deckhand-airskiff-deployment gate: jobs: - - deckhand-tox-py27-postgresql - deckhand-tox-py35-postgresql - deckhand-functional-docker-py35-ubuntu - deckhand-functional-docker-py35-opensuse - deckhand-chart-build-gate - deckhand-docker-build-gate-ubuntu - deckhand-docker-build-gate-opensuse + - openstack-tox-pep8 post: jobs: - deckhand-upload-git-mirror @@ -67,14 +67,6 @@ - name: primary label: ubuntu-xenial -- job: - name: deckhand-tox-py27-postgresql - parent: openstack-tox-py27 - pre-run: - - tools/gate/playbooks/install-postgresql.yaml - vars: - tox_envlist: py27-postgresql - - job: name: deckhand-tox-py35-postgresql parent: openstack-tox-py35 diff --git a/deckhand/common/document.py b/deckhand/common/document.py index 04877c5a..6d7f9155 100644 --- a/deckhand/common/document.py +++ b/deckhand/common/document.py @@ -184,5 +184,6 @@ def document_dict_representer(dumper, data): yaml.add_representer(DocumentDict, document_dict_representer) # Required for py27 compatibility: yaml.safe_dump/safe_dump_all doesn't # work unless SafeRepresenter add_representer method is called. +# Upd: somehow required also for py3*. safe_representer = yaml.representer.SafeRepresenter safe_representer.add_representer(DocumentDict, document_dict_representer) diff --git a/doc/source/contributor/developer-overview.rst b/doc/source/contributor/developer-overview.rst index 4d8b3941..1d5d6f07 100644 --- a/doc/source/contributor/developer-overview.rst +++ b/doc/source/contributor/developer-overview.rst @@ -101,9 +101,8 @@ Deckhand strives to conform to the Python ------ -The Deckhand code base lives under ``/deckhand``. Deckhand supports py27 -and py35 interpreters. Once OpenStack deprecates usage of py27, Deckhand -will as well. +The Deckhand code base lives under ``/deckhand``. Deckhand supports py35 through py37 +versions of interpreters. See :ref:`coding-guide` for more information on contribution guidelines. diff --git a/doc/source/contributor/testing.rst b/doc/source/contributor/testing.rst index 925c9c7a..bab4f5cf 100644 --- a/doc/source/contributor/testing.rst +++ b/doc/source/contributor/testing.rst @@ -57,19 +57,17 @@ Deckhand. To run unit tests using SQLite, execute:: - $ tox -epy27 $ tox -epy35 -against a py27- or py35-backed environment, respectively. +against a py35-backed environment, respectively. To run unit tests using PostgreSQL, execute:: - $ tox -epy27-postgresql $ tox -epy35-postgresql To run individual unit tests, run (for example):: - $ tox -e py27 -- deckhand.tests.unit.db.test_revisions + $ tox -e py35 -- deckhand.tests.unit.db.test_revisions .. warning:: @@ -169,12 +167,6 @@ Troubleshooting $ sudo apt-get install tox -y -* For any errors related to running ``tox -e py27``: - - Ensure that ``python-dev`` is installed:: - - $ sudo apt-get install python-dev -y - * For any errors related to running ``tox -e py35``: Ensure that ``python3-dev`` is installed:: diff --git a/doc/source/users/getting-started.rst b/doc/source/users/getting-started.rst index a51ada87..cc9c8c93 100644 --- a/doc/source/users/getting-started.rst +++ b/doc/source/users/getting-started.rst @@ -335,9 +335,3 @@ included beneath each bullet. Ensure that ``python3-dev`` is installed:: $ [sudo] apt-get install python3-dev -y - -* For any errors related to running ``tox -e py27``: - - Ensure that ``python3-dev`` is installed:: - - $ [sudo] apt-get install python-dev -y diff --git a/requirements.txt b/requirements.txt index 087cc9ed..5063b899 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,6 +29,7 @@ pbr==5.1.0 PasteDeploy==1.5.2 Paste==3.0.1 psycopg2==2.7.5 +pyyaml~=5.1 # TODO(alanmeadows) # this must match the container service diff --git a/setup.cfg b/setup.cfg index e0adef59..7347ea3e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,8 +12,6 @@ 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 diff --git a/tox.ini b/tox.ini index 00740abc..2fa54089 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 2.3.1 skipsdist = True -envlist = py{37,36,27},py{37,36,27}-{postgresql},functional,cover,pep8,bandit,docs +envlist = py{37,36},py{37,36}-{postgresql},functional,cover,pep8,bandit,docs [testenv] usedevelop = True @@ -25,19 +25,6 @@ basepython=python3 commands = {posargs} -[testenv:py27] -basepython = python2.7 -commands = - {[testenv]commands} - stestr run {posargs} - stestr slowest - -[testenv:py27-postgresql] -basepython = python2.7 -commands = - {[testenv]commands} - {toxinidir}/tools/run_pifpaf.sh '{posargs}' - [testenv:py35] basepython = python3 commands =