Commit Graph

114 Commits

Author SHA1 Message Date
Dr. Jens Harbott 6ee21bd722 Fix docs build for tox4
Replace deprecated whitelist_externals with allowlist_externals. Drop
skipsdist = True setting.

Change-Id: Iced0ce2472e5c0bd09fba0d274ef2772883a0a49
2023-01-12 10:21:47 +01:00
Hervé Beraud 11faa0e67d Fix linters and bindep on jammy
Bump linter requirements - follow the changes
made in keystone in commits
6dfde5b48b388e32e34a385c3a9ef48da7c7c49b and
5c71ebd7a92d25df83e2e7cc5fad9990e9eebbf5 in
order to fix compatibility with Python 3.10.

Remove python-dev from bindep - it's no longer
supported by jammy and lead us to the following
errors with the announce-release job:

```
No package matching 'python-dev' is available
```

Co-Authored-By: Herve Beraud <hberaud@redhat.com>
Change-Id: If687a2678733ce018bd31c602140f073ab1a1a65
2022-12-01 12:14:33 +00:00
Grzegorz Grasza 2445a5df78 Update python testing as per zed cycle teting runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes and update the python
classifier for the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com>
Change-Id: Ic7671ad666ebc0614686e068b9d4c0824e384fb3
2022-06-03 17:56:03 +02:00
Zuul c69cc01b7b Merge "Use TOX_CONSTRAINTS_FILE" 2022-05-06 16:59:41 +00:00
Zuul f9950b0ff3 Merge "bump py37 to py38 in tox.ini" 2022-05-06 16:55:12 +00:00
Ghanshyam Mann 7eeda4d9af Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I73718d9f52d11b9a17ab49468743d5237179ada5
2022-04-30 20:20:37 -05:00
zhangboye 1005c4be5b Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: Ie3771b123acace8320db5b2e8dfadeef1c2a1b90
2022-04-29 15:53:08 +00:00
Dr. Jens Harbott 7bbce9761c Fix docs build
Avoid conflicts between apidoc generated documentation and the source
code by adding "noindex" to SPHINX_APIDOC_OPTIONS.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ib1498a3712ec9cfd0abcb282b093f82ba0ee8128
2022-01-21 13:28:46 +01:00
maaoyu 10d9dfd8e1 bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.

ref:
  https://governance.openstack.org/tc/reference/runtimes/victoria.html

Change-Id: I9cf801f2beda01b04e48488156fec0de11efe3a9
2020-10-12 13:34:19 +08:00
Monty Taylor 4aaa2e52b0 Drop python 3.5 support
Now that we released ussuri, we have a stable release that supports
3.5. That means if needed we can backport changes needed for
zuul and nodepool, so it should be safe to go ahead and drop 3.5
support.

Change-Id: Iaaba139009f2b49815c29717d71b9182a6bec2ab
2020-06-22 10:04:17 -05:00
Ghanshyam Mann c1e843b0cd Add in-tree upper-constraints for py35 job
It is difficult to keep the py35 upper constraints on reqiorements
repo's upper-constarint.txt file as update-constraint tools generate
the new file everytime with official supported python version only
which is py3.6 and py3.8 for Victoria cycle
- https://review.opendev.org/#/c/730428

Let's keep the py3.5 constraints in-tree which can be used in py35
unit test job.

Change-Id: Iec2eaa2b7e8df777b6988c2134e7771b9b1fb5b5
2020-06-01 15:45:07 +00:00
Andreas Jaeger c096099416 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, those are not
needed for co-installing.

Change-Id: I59f0854c089a6ed4f0c4dad7755f946dc95ada3a
2020-03-31 20:11:31 +02:00
Vishakha Agarwal aafc90a9c2 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

keystoneauth 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: I76ad66b76a85db9609aebc08e1f26a74219402f0
2020-01-07 12:31:09 -05:00
Vishakha Agarwal 0c34f0f8ff Generate pdf documentation
This commit adds a new tox target to build pdf documentation.

Change-Id: I8defd8cb18316956f3f8fdc1af743a4a1123b0a9
2019-09-27 12:58:07 +05:30
Colleen Murphy 249d1e9924 Follow the PTI for docs
Use sphinx-build instead of the pbr sphinx extention for building docs
as instructed by the PTI[1].

This requires using the sphinxcontrib-apidoc plugin rather than the
autodoc pbr extention. We also remove the reference to the ChangeLog
file that is usually generated by pbr and instead refer to the published
reno release notes. Also fixes the header formatting for the index page,
as the headers weren't rendering at all.

[1] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: Iec8b99fa89877e357cf2e754abad77c9032acad1
2019-09-26 11:11:47 -07:00
Corey Bryant 92ec14c66b Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I0e4ec9d2b2e283beae6332923f44806ad7add9f8
Story: #2005924
Task: #34215
2019-06-26 18:44:23 -04:00
caoyuan 0682135749 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ifd65f93e3ddde4ac06a4f37a41238b81d7e03165
Closes-Bug: #1827008
2019-05-29 02:30:15 +00:00
Vishakha Agarwal e70d34184f Update the min version of tox
In Train, we will use python3.6 and 3.7 for which
the minimum tox version required is 2.5[1]

[1]https://tox.readthedocs.io/en/latest/changelog.html#v2-6-0-2017-02-04

Change-Id: Ibe07f6fca6760b5897bc6a00f2dd40550f33d713
2019-04-09 14:59:50 +05:30
Vishakha Agarwal 33a804a288 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release.
The current target py3 runtime for Stein is Python 3.6,
so there is no reason to keep testing against the older version. Also
correct setup.cfg and tox.ini to reflect the current supported Python
versions.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: I9d1b57b981269fea3afe39cf524350f3c4a7d944
2019-03-01 11:32:50 +01:00
Colleen Murphy 0db112c4a6 Add py36 tox environment
We already run python3.6 unit tests in CI. Add the py36 environment to
the tox file so that developers with python3.6 available locally can opt
into running that version too.

Change-Id: I499db960450b9628636d503a4d7f1cc163d38e3a
2018-11-06 12:57:12 +01:00
Doug Hellmann 3cca1f4eb0 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I2db130183c0a657b281e0990593fb86be6bef017
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 15:27:00 -04:00
Doug Hellmann f41e304849 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Also fix the lower bound for requests-kerberos.

Change-Id: Ie5da1d132321b2cffea3eb8522462daad45900b5
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-19 09:54:28 +02:00
Monty Taylor 8ece7fcf2d Remove tox_install.sh and align with constraints consumption
As part of removing reliance on the old and deprecated zuul-cloner, we
need to shift constraints declaration to the deps line. This means we
unfortunately have to duplicate the extras declarations into
test-requirements - because otherwise the contraints for keystoneauth
conflicts with the installation of itself.

Change-Id: If162dde93423a495064c4ae1a5dad4e7eb8f9577
2018-03-23 19:15:31 +01:00
Colleen Murphy 8bd6312ebc Add pep8 import order validation
Add the flake8-import-order library to our test requirements so that we
can avoid these PEP8 violations and maintain consistent import ordering.
Also fix our violations.

This library is in requirements but is blacklisted from being
automatically updated since it is never shipped. For now, don't bother
to pin it.

Change-Id: I4e788292b98b7f2f835cc80081763b2d249fe43e
2018-02-15 20:07:04 +01:00
Colleen Murphy 8026c964f3 Use stestr in tox.ini
Like our other projects, we should use stestr now. This helps especially
with being able to run one test at a time locally.

Change-Id: Ic9b139168654930b4f2f0a0477bbb8779b477590
2018-01-17 14:37:32 +01:00
Colleen Murphy 48829139d3 Fix docs builds
With the new way of generating docs in the gate[1] our autodoc builds
are slightly broken. Put the required dependencies for doc building and
autodoc generation into doc/requirements.txt. We can also now remove
docs-related requirements from test-requirements.txt.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I77a09349304451041491893466ca98ba6ebdf96b
2017-12-19 22:31:15 +01:00
Monty Taylor ea3bfb1beb
Migrate to stestr
ostestr has already updated to stestr. Update the files here to make
sure it works properly.

Change-Id: I172cbb158f728a74bcb976fa68b78c28589eaa0c
2017-09-20 15:47:15 -05:00
wangzhenyu ec11a2c6fc Enable some off-by-default checks
Some of the available checks are
disabled by default, like:
[H106] Dont put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: Ic6ffe931f6b5fb7a851d5daecad10e30e3f92b1a
2017-07-26 22:07:14 -04:00
Gage Hugo 7bf7619104 Remove pbr warnerrors in favor of sphinx check
This change removes the soon-to-be unused "warnerrors" setting,
which will be replaced by "warning-is-error" in sphinx
releases >= 1.5.[0] This also pre-emptively fixes most warnings
that came up when testing with sphinx >= 1.5:

- Multiple cases of Opts
- Redundant loading of todo extension

Added a comment to not to enable the new sphinx setting until
the issues with Changlog building are fixed.

Added setup.py to the list of files to ignore when building
docs.

[0] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113085.html

Change-Id: Ia0079c6b551dd3896bc3d922a477f927757bd61b
2017-03-07 20:51:19 -06:00
Eric Brown b7008bd1b6 Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I82f370a4d9da07e121e0ce6cac851008e3925639
2017-01-05 15:27:51 -08:00
Tony Breeds 7c2d2220c3 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove keystoneauth.

Change-Id: I5101c316ec57c6166ca7fee47de9450a936f0664
2016-12-21 11:24:09 +11:00
lilintan 8202c6aabc Don't include openstack/common in flake8 exclude list
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator, so don't use
this directory any more.

Change-Id: I8ac81a0615f9d2e35012d95ceab3c21986b256ba
2016-08-02 20:36:47 +08:00
Yatin Kumbhare 88d4fdb14a Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I277c17f774e880b6d2c7c73a8410f1cd1167f055
2016-07-12 21:05:25 +05:30
Dolph Mathews cf520d9ca4 PEP257: Ignore D203 because it was deprecated
PEP257's D203 check ensures that you have a blank line before class
docstrings. This rule directly conflicts with D211 (no blank lines
before class docstrings), which is intended to supersede D203.

The original language in PEP257 which D203 was based on was actually
removed from PEP257 by Guido here:

  https://hg.python.org/peps/rev/9b715d8246db

Change-Id: Icc048b947acea8f655d00540c221123b906e7545
2016-06-03 08:52:21 -05:00
Jamie Lennox c10722b789 Add oauth plugin to keystoneauth
OAuth1 has been supported by keystone for a long time, and was supported
as an authentication plugin in keystoneclient. Port this work to
keystoneauth and add the ability to load it from the CLI.

Closes-Bug: #1524862
Change-Id: Ie53aeb1b926104cac692cd98551a701522f7fec4
2016-05-10 14:31:59 +10:00
Brant Knudson 48ec8bfc16 Enable bandit
The bandit linter checks for common security-related issues.

The setup here is the same as in keystone.

Change-Id: Ide2bc772f541d9efbf5e43f42f0893bf7495b24f
2016-04-29 09:07:35 -05:00
Navid Pustchi 21d5ba92e0 Fix H405, D105, D200, and D203 PEP257
Curently tox ignores H405, D105, D200, and D203.
H405: multi line docstring summary not separated with an empty line.
D105: Missing docstring in magic method.
D200: One-line docstring should fit on one line with quotes.
D203: 1 blank required before class docstring.
This patch removes tox ignores and fix docstrings.

Change-Id: Ia3ac9796630e24ce04dc9f38a8d944334d6978d2
2016-04-19 21:05:19 +00:00
Navid Pustchi f95a3bb6bc Fixing D204, D205, D208, and D211 pep8
Curently tox ignores D204, D205, D208, and D211.
D204: 1 blank required after class docstring.
D205: Blank line required between one-line summary and description.
D208: Docstring is over-indented.
D211: No blank lines allowed before class docstring.
This patch removes tox ignores and fix docstrings.

Change-Id: I691f728e7b12ad4fcd542a116fd3d491e83393a4
2016-04-19 08:30:55 +00:00
Navid Pustchi 2caee11017 Fixing D301 docstring.
Currently tox ignores D301 (D301: Use r”“” if anybackslashes in a
docstring). This change removes D301 ignore.
All pep8 violatios are fixed.

Change-Id: Icfe41f21ce26e687c322daca4a927de2ebdb9848
2016-04-19 06:35:59 +00:00
Navid Pustchi 2e0c0030a9 Removing tox ignore D400.
Currently tox ignores D400 (D400: First line should end with a period).
This change removes D400 ignore.
All pep8 violatios are fixed.

Change-Id: I9190a15a36c90d3c60a9c520cb53d5f182b0c4e9
2016-04-18 21:20:51 +00:00
Navid Pustchi 01cf25ad36 Removing tox ignore D401 and make keystoneauth compliant
Currently tox ignores D401 (401: First line should be in imperative mood).
This change removes it and make keystoneauth docstring compliantwith it.

Change-Id: Ia3bc1ecf0d2bd9699e9a1a549f9995c008db233c
2016-04-13 18:46:05 +00:00
Prosunjit Biswas 7d448dbc55 Fix for PEP8 violation - D202
(No blank lines allowed after function docstring.)

Change-Id: Ice629f0ef8b1431f0c4655ff37efe0cd5e9c86ec
2016-03-30 04:18:34 +00:00
Ondřej Nový 305c33d747 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I53c5f2e060864432c88867ab58934301ec757298
2015-12-11 21:18:24 +01:00
Morgan Fainberg 491e7160cf Add BetaMax Fixture
Add a BetaMax fixture that handles wrapping the constructor for
KeystoneAuth Session in a way to provide the BetaMax interfaces.

This is in support of enabling easy functional testing that includes
responses to live-clouds for consumers of KeystoneAuth.

A future patch will provide a template for stripping out sensitive
(e.g. password) data from the recordings so that the cassetts can be
more easily included in git repositories for functional testing.

Change-Id: Ibd6e525fef9f2541f97d33de0d2f02f991d122e5
Depends-On: I8787954ab5d0e3963e97c160783301b48ab8299f
2015-12-06 17:57:06 -05:00
Dave Chen 820aeec0ff Put py34 first in the env order of tox
To solve the problem of "db type could not be determined" on py34 we
have to run first the py34 env, then, run py27.  This patch puts py34
first on the tox.ini list of envs to avoid this problem to happen.

Change-Id: I31857b82f30b495a77d77a9df70ee31487a906b7
Closes-Bug: #1489059
2015-12-03 12:05:52 +08:00
Steve Martinelli e9c602689a Add release notes for keystoneauth
as mentioned in the mailing list, we need to include release notes
for libraries, note that we do not include changes for liberty.

Change-Id: I203a1c7d64fbf65492c7f4fd4cbf7c8970be561d
2015-11-29 20:05:16 -05:00
David Stanek ebad8e25ec Remove Python 2.6 support
We are removing Python 2.6 support from the Keystone libraries.

Change-Id: I1a4cc85ff6b61174ca06048d353c7a87c523e8f0
Closes-Bug: 1519449
2015-11-24 21:11:46 +00:00
Dolph Mathews 58e2aed5c5 Add docstring validation
This introduces a linter for PEP257 to avoid trivial nitpicking of
docstrings in code reviews. Because flake8_docstrings simply provides a
plugin to add pep257 to flake8, you can run it via `tox -e pep8`.

PEP257 checks which we are currently violating are ignored in tox.ini.
We can remove them from the ignored list as they are fixed.

Change-Id: I01ebad7b70cf61dd80d3c06c6808d8178fbdd634
Related-Bug: 1501544
Depends-On: I60adf0dca4aa32f4ef6bca61250b375c8a3703c6
2015-11-24 11:19:46 -05:00
lin-hua-cheng 63429aeca8 Address hacking check H405
Previously, there were a string of commits to keystone that addresed ignored
hacking checks. This commit does the same for H405 in keystoneauth. This
also modifies our tox.ini so that we no longer ignore H405 violations.

Change-Id: I0ac1165f309edd486639e2729c18330b1d062eb3
Closes-Bug: 1482773
2015-11-18 21:18:37 -08:00
Brant Knudson 2baf7c49ad Migrate kerberos plugin
The auth plugin from the keystoneclient-kerberos repository is
copied to this package. It was in its own repository because it
requires the requests-kerberos package and we want to minimize
requirements in keystoneauth (or keystoneclient at the time the
plugin was originally developed). Since we've got support for
"extras" in setup.cfg in pip now this isn't an issue with the
package anymore. Users of the kerberos plugin must install the
extra packages using

 $ pip install keystoneauth['kerberos']

otherwise the plugin will fail to load.

Closes-Bug: 1512741
Change-Id: Ia84bf559413e9bfd1a3faaceb417c2477bd10d5f
2015-11-10 10:05:57 -06:00