Compare commits

..

6 Commits

Author SHA1 Message Date
Andreas Jaeger
c4b0bd2cdb Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I34f79cee33b7f5ad4a3adf0ad73f7e38052e921b
2020-05-22 17:18:38 +00:00
Zuul
44982f2456 Merge "Update hacking for Python3" 2020-04-21 07:35:42 +00:00
b475012330 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I01a66fa1b522c19392228d70c784ba8bb80603fe
2020-04-11 18:44:10 +00:00
Andreas Jaeger
9c8f2f29d4 Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers

Change-Id: I175c9e6078c352950933372e7ea89d5951fd6fc6
2020-04-04 16:52:27 +02:00
Andreas Jaeger
9af7683133 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I3dfc16a044db1eaffae909db5aa11496d4294a89
2020-03-31 12:10:29 +02:00
Ghanshyam Mann
6ded5189ba [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-karborclient is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I777e4ecb3dbb1bea98a9a8c2e5bde1ee4129cc0f
2019-12-15 01:15:10 +00:00
11 changed files with 31 additions and 49 deletions

View File

@@ -3,7 +3,6 @@
- check-requirements
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- openstack-python3-victoria-jobs
- openstackclient-plugin-jobs
- publish-openstack-docs-pti

View File

@@ -1,5 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0

View File

@@ -48,7 +48,7 @@ add_function_parentheses = True
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# -- Options for HTML output --------------------------------------------------
@@ -59,10 +59,9 @@ html_theme = 'openstackdocs'
# html_static_path = ['static']
# openstackdocstheme options
repository_name = 'openstack/python-karborclient'
bug_project = 'python-karborclient'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
openstackdocs_repo_name = 'openstack/python-karborclient'
openstackdocs_bug_project = 'python-karborclient'
openstackdocs_bug_tag = ''
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project

View File

@@ -133,9 +133,9 @@ class ShellCommandTest(ShellTest):
def test_help(self):
required = [
'.*?^usage: karbor',
'.*?^\s+plan-create\s+Creates a plan.',
'.*?^See "karbor help COMMAND" for help on a specific command',
r'.*?^usage: karbor',
r'.*?^\s+plan-create\s+Creates a plan.',
r'.*?^See "karbor help COMMAND" for help on a specific command',
]
stdout, stderr = self.shell('help')
for r in required:
@@ -144,8 +144,8 @@ class ShellCommandTest(ShellTest):
def test_help_on_subcommand(self):
required = [
'.*?^usage: karbor plan-create',
'.*?^Creates a plan.',
r'.*?^usage: karbor plan-create',
r'.*?^Creates a plan.',
]
stdout, stderr = self.shell('help plan-create')
for r in required:
@@ -154,9 +154,9 @@ class ShellCommandTest(ShellTest):
def test_help_no_options(self):
required = [
'.*?^usage: karbor',
'.*?^\s+plan-create\s+Creates a plan',
'.*?^See "karbor help COMMAND" for help on a specific command',
r'.*?^usage: karbor',
r'.*?^\s+plan-create\s+Creates a plan',
r'.*?^See "karbor help COMMAND" for help on a specific command',
]
stdout, stderr = self.shell('')
for r in required:

View File

@@ -195,7 +195,7 @@ def do_plan_update(cs, args):
if args.name is not None:
data['name'] = args.name
if args.description is not None:
data['description'] = args.description
data['description'] = args.description
if args.resources is not None:
plan_resources = arg_utils.extract_resources(args)
data['resources'] = plan_resources

View File

@@ -36,7 +36,6 @@ msgpack-python==0.4.0
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
openstackdocstheme==1.18.1
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
@@ -76,8 +75,6 @@ rfc3986==0.3.1
simplejson==3.5.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
stevedore==1.20.0
testrepository==0.0.18
testscenarios==0.4

View File

@@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of python-karborclient
to support python 2.7 is OpenStack Train. The minimum version of Python now
supported is Python 3.6.

View File

@@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/python-karborclient/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@@ -13,16 +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 :: Implementation :: CPython
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
[global]
setup-hooks =
pbr.hooks.setup_hook
[files]
packages =
karborclient
@@ -90,6 +87,3 @@ input_file = karborclient/locale/karborclient.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = karborclient/locale/karborclient.pot
[wheel]
universal = 1

View File

@@ -13,17 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# 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)

View File

@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD

14
tox.ini
View File

@@ -1,9 +1,11 @@
[tox]
minversion = 2.0
envlist = py27,py37,pypy,pep8
minversion = 3.1.1
envlist = py37,pypy,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
@@ -19,39 +21,33 @@ commands =
python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
python setup.py test --coverage --testr-args='{posargs}'
coverage report
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t karborclient/tests {posargs}
[flake8]
show-source = True
ignore =
ignore = W504
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt