diff options
author | pengyuesheng <pengyuesheng@gohighsec.com> | 2019-12-25 17:37:09 +0800 |
---|---|---|
committer | Andreas Jaeger <aj@suse.com> | 2020-02-03 14:45:41 +0100 |
commit | 939253044a957793b82c2c091a766e6656d573d0 (patch) | |
tree | caa5eb93bf40f722a8f2045f072460293cb1c879 | |
parent | 9d1c08e1f29007dea121a70875b603fb5644d265 (diff) | |
download | pycadf-939253044a957793b82c2c091a766e6656d573d0.tar.gz |
Drop python 2.7 support and testing
Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
Include small cleanups:
* remove install_command from tox.ini, this is the default
* Use sphinx-build as modern way to run sphinx, remove setup.cfg
settings for build-sphinx
* Use sphinxcontrib-apidoc for docs with newer sphinx
* Remove obsolete doc/source/conf.py broken
* Add python-requires to setup.cfg to make Python 3.6 requirement
explicit
* Remove obsolete pbr setup-hooks
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: Iec8c47b82022b616b8361651bf23f853b0ce5624
-rw-r--r-- | .zuul.yaml | 2 | ||||
-rw-r--r-- | doc/source/conf.py | 12 | ||||
-rw-r--r-- | lower-constraints.txt | 1 | ||||
-rw-r--r-- | releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml | 5 | ||||
-rw-r--r-- | setup.cfg | 21 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 19 |
7 files changed, 26 insertions, 35 deletions
@@ -1,10 +1,8 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti diff --git a/doc/source/conf.py b/doc/source/conf.py index ea08a5b..fb52014 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -29,6 +29,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinxcontrib.apidoc', #'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', @@ -57,9 +58,9 @@ copyright = u'2014, OpenStack Foundation' # built documents. # # The short X.Y version. -version = '1.0' +# version = '1.0' # The full version, including alpha/beta/rc tags. -release = '1.0' +# release = '1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -140,7 +141,7 @@ html_theme_options = { # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +# html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. @@ -182,6 +183,11 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M' # Output file base name for HTML help builder. htmlhelp_basename = 'pyCADFdoc' +apidoc_module_dir = '../../pycadf' +apidoc_output_dir = 'api' +apidoc_excluded_paths = [ + 'tests', +] # -- Options for LaTeX output -------------------------------------------------- diff --git a/lower-constraints.txt b/lower-constraints.txt index 4c4af0d..30d9458 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -46,6 +46,7 @@ rfc3986==0.3.1 six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.2 +sphinxcontrib-apidoc===0.2.0 sphinxcontrib-websupport==1.0.1 stevedore==1.20.0 stestr==2.0.0 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..16eba83 --- /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 pycadf is Python 3.6. @@ -6,6 +6,7 @@ summary = CADF Library description-file = README.rst home-page = https://docs.openstack.org/pycadf/latest/ +python-requires = >=3.6 classifier = Development Status :: 3 - Alpha Environment :: OpenStack @@ -14,8 +15,6 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent 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 @@ -32,21 +31,3 @@ data_files = etc/pycadf/trove_api_audit_map.conf etc/pycadf/ceilometer_api_audit_map.conf etc/pycadf/swift_api_audit_map.conf - -[global] -setup-hooks = - pbr.hooks.setup_hook - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - -[pbr] -warnerrors = True -autodoc_tree_index_modules = True -autodoc_tree_root = ./pycadf diff --git a/test-requirements.txt b/test-requirements.txt index 2aeda8a..bb36dc6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -15,3 +15,4 @@ testtools>=2.2.0 # MIT # this is required for the docs build jobs openstackdocstheme>=1.18.1 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinxcontrib-apidoc>=0.2.0 # BSD @@ -1,9 +1,10 @@ [tox] -minversion = 2.0 -envlist = py27,py37,pep8 +minversion = 3.1.1 +envlist = py37,pep8 +ignore_basepython_conflict = True [testenv] -install_command = pip install {opts} {packages} +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt @@ -11,15 +12,16 @@ deps = commands = stestr run --slowest {posargs} [testenv:pep8] -basepython = python3 commands = flake8 [testenv:docs] -basepython = python3 -commands = python setup.py build_sphinx +whitelist_externals = + rm +commands = + rm -rf doc/build/html doc/build/doctrees + sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html [testenv:cover] -basepython = python3 setenv = PYTHON=coverage run --source pycadf --parallel-mode commands = @@ -29,11 +31,9 @@ commands = coverage xml -o cover/coverage.xml [testenv:venv] -basepython = python3 commands = {posargs} [testenv:debug] -basepython = python3 commands = oslo_debug_helper {posargs} [flake8] @@ -58,7 +58,6 @@ ignore = H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D400,D exclude = .tox,dist,doc,*.egg,build [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt |