Commit Graph

96 Commits (23afb2d631608a0a422e5b3b0b8dcedda9f5c285)

Author SHA1 Message Date
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
Marek Denis 34993d332c SAML2 authentication plugins in keystoneauth
Move SAML2 related auth plugins directly to keystoneauth.
Since SAML2 plugins requires ``lxml` which is a heavy dependency,
plugins will be installed on request:

$ pip install keystoneauth[saml2]

Authentication plugins has been renamed to Saml2Password
and ADFSPassword.

Change-Id: I7872f7524902e4b723ab685c684e16162a4af781
Implements: bp saml2-to-ksa
2015-11-04 15:09:56 +11:00
TerryHowe ec16789cf1 Convert project to os-testr
I am not sure how folks feel about this, but I think os-testr
makes failures a little easier to debug when tests fail.  For
one thing you get stdout/stderr in the test output.  Running a
single test is a little different:

    tox -e py27 -- --regex keystoneauth1.tests.unit.identity.test_token

Change-Id: Iea05633af3708c5e9443d86c8ddf947e68c0bebe
2015-09-03 06:52:54 -06:00
Eric Brown 2c576b1a7d py34 not py33 is tested and supported
The setup.cfg refers to Programming Language of Python 3.3 whereas
jenkins is setup only to test Python 3.4. This patch updates setup.cfg
and removes py33 from tox.ini..

TrivialFix

Change-Id: I7a8915d07b666fd31103a968daeceb5a1ba47d81
2015-07-31 04:36:52 +00:00
Morgan Fainberg a0000e4e9a Move to the keystoneauth1 namespace
Conver from the keystoneauth namespace to keystoneauth1. This is to
ensure that is is possible to install all versions of keystoneauth
side-by-side.

Change-Id: Ibbaf11525980c8edb5968d8b8ee19c55094e77d8
2015-06-25 16:48:54 -07:00
Morgan Fainberg fd74823cfb Remove catalog/translation targets from tox.ini
Keystoneauth does not do translation. This removes the added tox
target information for translations.

Change-Id: Ibfae8247ac7f3c54a9a8abe1b2557a0b995a816f
2015-06-25 12:34:10 -07:00
Jamie Lennox ef4988a4c8 Remove functional tests from tox
There are no functional tests for keystoneauth so remove them from tox.

Change-Id: I1f9b3b641a85cc88ebb9c560d890cb4323e3c356
2015-06-15 12:29:40 +08:00
Morgan Fainberg f70d313def Initial Split of python-keystoneclient to keystoneauth
Change-Id: Ib33d022506072749e23caf6d9defbcc9a65c8b48
2015-04-20 14:49:59 -07:00
Jamie Lennox c419425c85 Create functional test base
Setup test runners to run unit tests by default and add a stub
functional test that we can get gating.

Change-Id: I6627925ab63340c880adc7c938a0b74faff47bc7
Implements: bp functional-testing
2015-02-13 17:55:34 +11:00
Jenkins 63b889f0fe Merge "Switch from oslo.utils to oslo_utils" 2015-02-10 02:11:19 +00:00
ZhiQiang Fan 734091e1a1 Enable hacking rule E122 and H304
E122: continuation line missing indentation or outdented
H304: no relative imports

E122 and H304 havealready been fixed but not removed from exception
list, this patch enables them.

Change-Id: I1375bed51e9670fc4d174e7afce0ef3b3be83822
2015-02-02 09:21:31 +08:00
Brant Knudson dbb5395620 Switch from oslo.utils to oslo_utils
oslo_utils moved out of the oslo namespace.

bp drop-namespace-packages

Change-Id: I72e67dc1f649ba137dd06f5ab7133858c6abd67d
2015-01-31 08:03:37 -06:00
Brant Knudson 9db0c454b4 Correct failures for check H238
The new H238 "old style class declaration, use new style (inherit
from `object`)" rule was failing and ignored.

Change-Id: I9f616d74e4777640cc9441e96f2bd8c1873aaaca
2015-01-21 07:26:59 -06:00
ZhiQiang Fan 4170c9aece Enable hacking rule F821
F821: undefined name

Currently, we define global variables at runtime in
keystoneclient/tests/test_shell.py, which cannot detected by hacking
rule check, then it fails for rule F821.

This patch changes the global lambda shell to a helper function.

Change-Id: Iaf5c4e40a6b17fbf4ba0c254b75d347f08b52364
2015-01-20 07:32:20 +00:00
Brant Knudson 264b735281 Correct failures for check W292
The new W292 "no newline at end of file" rule was failing and
ignored. Now it's enforced.

Change-Id: I71ba57a056b5b0c772482f5bd80f3e05dffa54d2
2015-01-13 16:49:00 -06:00
Brant Knudson da69f7fc85 Move to hacking 0.10
Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

H803 is no longer checked by hacking per the release notes.

H904 is no longer checked by hacking.

Change-Id: Ifaf62839a4b6da62a3b380396158b463c1381026
2015-01-13 16:43:53 -06:00
Brant Knudson 961c1048cd I18n
Keystoneclient didn't provide translated messages. With this
change, the messages are marked for translation.

DocImpact

Implements: blueprint keystoneclient-i18n

Change-Id: I85263a71671a1dffed524185266e6bb7ae559630
2014-10-28 20:33:19 +00:00
Steve Martinelli ffaac84e55 Use oslo_debug_helper and remove our own version
With the latest version of oslotest, we can now take advantage
of a common oslo_debug_helper script.
We can now remove our own homebrewed version, minor changes to
tox.ini were needed.

Change-Id: I907f7203aefedc9b33c3dfbfecc9793e273a4a8f
2014-10-22 15:22:18 -04:00
Steve Martinelli 04054b0ddc Update hacking to 0.9.x
Address some issues that came up because of hacking upgrade.
But ignoring H904 since the slashes are valid, as they are in
comments, not code.

Change-Id: Ie8a94fc71632e4130c2ec663a5c6d3f2042f8263
Closes-Bug: #1328469
2014-09-21 02:44:37 -04:00