diff --git a/.zuul.yaml b/.zuul.yaml index 18e5056..461325d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,10 +1,8 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-train-jobs - periodic-stable-jobs - publish-openstack-docs-pti diff --git a/lower-constraints.txt b/lower-constraints.txt index eb6de18..1044e4b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -8,7 +8,6 @@ dulwich==0.15.0 extras==1.0.0 fixtures==3.0.0 flake8==2.2.4 -funcsigs==1.0.0 hacking==0.10.3 imagesize==0.7.1 Jinja2==2.10 diff --git a/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml new file mode 100644 index 0000000..c1b27d9 --- /dev/null +++ b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The minimum version of Python now + supported by debtcollector is Python 3.6. diff --git a/requirements.txt b/requirements.txt index 687ba47..dda3fe7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,3 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 six>=1.10.0 # MIT wrapt>=1.7.0 # BSD License -funcsigs>=1.0.0;python_version=='2.7' or python_version=='2.6' # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index fc774c4..e1280c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description-file = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/debtcollector/latest +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,24 +14,12 @@ 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 = debtcollector - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index 566d844..f63cc23 100644 --- a/setup.py +++ b/setup.py @@ -16,14 +16,6 @@ # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index d21f121..4626f54 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,8 +6,7 @@ hacking<0.11,>=0.10.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD openstackdocstheme>=1.18.1 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index def4cff..81d0b1c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,37 +1,31 @@ [tox] -minversion = 2.0 -envlist = py27,py37,pep8 +minversion = 3.1.1 +envlist = py37,pep8 +ignore_basepython_conflict = True [testenv] +basepython = python3 setenv = VIRTUAL_ENV={envdir} - BRANCH_NAME=master - CLIENT_NAME=debtcollector -install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt -commands = stestr run --slowest {posargs} +commands = + stestr run --slowest {posargs} + sphinx-build -b doctest doc/source doc/build + doc8 --ignore-path "doc/source/history.rst" doc/source [testenv:debug] -basepython = python3 -commands = oslo_debug_helper {posargs} - -[testenv:debug-py27] -basepython = python2.7 commands = oslo_debug_helper {posargs} [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 setenv = PYTHON=coverage run --source $project --parallel-mode commands = @@ -41,15 +35,7 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] -basepython = python3 -commands = python setup.py build_sphinx - -[testenv:py27] -basepython = python2.7 -commands = - stestr run --slowest {posargs} - sphinx-build -b doctest doc/source doc/build - doc8 --ignore-path "doc/source/history.rst" doc/source +commands = sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html [flake8] # E123, E125 skipped as they are invalid PEP-8. @@ -58,11 +44,9 @@ ignore = E123,E125 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [testenv:releasenotes] -basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt