2520 Commits

Author SHA1 Message Date
Doug Hellmann
6940b4ff0a use importlib.metadata to get keyring version
Importing pkg_resources has a side-effect of scanning the metadata of
all of the installed python modules to build an in-memory cache. That
cache isn't used anywhere in keystoneclient, and it can be expensive
to build.

The importlib.metadata module in the 3.8 standard library (and the
importlib_metadata library for earlier versions) provides the same
version lookup service using a more efficient scanning
implementation. Switching from pkg_resources to importlib.metadata
will help application startup time, which is especially important for
command line programs such as python-openstackclient.

Change-Id: Ia89044ff1876eeb2793cd08ed9095ce2ffe89e09
Depends-On: Ic6db7af34c87a636bfe55bacae03c42154f4b9c7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2022-04-22 15:48:44 +00:00
wangzihao
77cd7fa638 trivial: Drop os-testr
os-testr is dead. Long live stestr

Change-Id: I218a29502912376b116d3b42f571df1b384e2ba6
2022-04-22 15:47:04 +00:00
wu.chunyang
ca66b728ce Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Remove babel.cfg as well, this is the default role and not needed
anymore.

also remove Babel from requirements[1]
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014227.html

Change-Id: I0de45b0ced44fc0b4110b42912ab7682f243aaa2
2022-04-22 15:46:38 +00:00
Hervé Beraud
32996f268c Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I0173b210e343ccf6b00c3b66959c001fdb1d699b
2022-04-22 15:40:13 +00:00
zhangtongjian
07c7f94601 remove unicode from code
Change-Id: I2d2d025b0d8bda2ffc7be4d30489728c05f53c8e
2022-04-19 15:57:10 +08:00
ea1308ad0e Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: I0856420ed57a8a98b086f75922aa228c43e9273c
2022-03-11 10:53:07 -06:00
Alfredo Moralejo
b7e97f2e9f Use a stronger hash algorithm in the example certs
CentOS Stream 9 does not accetp sha1 as a valid algorithm. This patch is
fixing the script used to generate the example certs and updating them.

Closes-Bug: #1963925
Change-Id: I6f1eb40bfd3d5adbf47ccd07fe06e2942e67644f
2022-03-07 16:37:36 +01:00
8d8c31e500 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: Id7127c22dd9865c8ac08a1239f0ba483b9dacddc
2022-03-04 10:43:46 -06:00
893747d4ff Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.

Sem-Ver: feature
Change-Id: I76270b66d167fbfe2da69524765f787b74249aa4
2022-03-04 10:42:27 -06:00
59419f7899 Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I952631a191752b560f3069a5b8572e3ccf93aedd
Sem-Ver: feature
2022-03-04 16:37:47 +00:00
Zuul
0e26418f64 Merge "Fix bindep.txt to work with newer CentOS and RHEL" 2022-02-25 18:28:09 +00:00
Grzegorz Grasza
0e2f6788f0 Fix bindep.txt to work with newer CentOS and RHEL
Tested this with centos7, rhel7, rhel8, fedora35.

Change-Id: Ibfe495ab3d5e282bc38d5e31c7b10c4018767a20
2022-02-21 15:34:45 +01:00
Takashi Kajinami
b15dfff348 setup.cfg: Replace dashes by underscores
Since setuptools v54.1.0[1], the parmeters with dash have been
deprecated in favor of the new parameters with underscore.

This change updates the parameters accordingly to avoid the warnings
like the example below.

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I0335bf0e7382597abddc0cadd6fc49775ad1396e
2022-02-05 17:08:39 +00:00
Zuul
100253d52e Merge "Add access to /v3/auth/systems" 2021-11-22 23:02:47 +00:00
Radomir Dopieralski
56c7b502c0 Add access to /v3/auth/systems
Closes-bug: 1945649
Change-Id: I7df5d9bf3cfb0e58e0e129a56170c8fe33523a4c
2021-11-22 15:15:20 +01:00
Dr. Jens Harbott
ea6fe1da5d Stop using an admin endpoint by default
With V3 of the identity API, we no longer need to have a dedicated admin
endpoint, so stop requesting one by default, allowing deployments to
actually work without one.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I96cc9c14008bcc59992d06c89f8f50895390f11e
2021-11-05 22:37:50 +01:00
Zuul
a45e39c1d9 Merge "Drop lower-constrait job" 2021-11-02 18:06:15 +00:00
Radomir Dopieralski
f6569e22fc Fix doc error to unblock the gate
/home/zuul/src/opendev.org/openstack/python-keystoneclient/.tox/docs/lib/python3.8/site-packages/keystoneauth1/fixture/discovery.py:docstring of keystoneauth1.fixture.discovery.DiscoveryList:1:duplicate object description of keystoneauth1.fixture.discovery.DiscoveryList, other instance in api/keystoneclient.fixture, use :noindex: for one of them

Change-Id: Id2722a1b275be88af6d0337684f1eb012b7f4ce1
2021-10-14 13:38:45 +02:00
Takashi Kajinami
0c4e2940ff Drop lower-constrait job
Lower-constraints is not required and has been dropped from Keystone
because of an issue with the new dependency resolver in pip[1].
The job is currently broken so let's disable it to unblock gate first.

[1] d6610594d1b766a8ee3ac65182b951f2a3d431f7

Change-Id: I67b8981b211c5d15154c919ea6f4f75639863437
2021-04-05 16:16:13 +09:00
Zuul
d5cb761763 Merge "Replace assertItemsEqual with assertCountEqual" wallaby-em xena-em 2020-09-09 03:33:05 +00:00
Ghanshyam Mann
eecac33faa [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40190

Closes-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h>

Change-Id: Ieada47b1455e635208bafe12168fadcb65bc72b9
2020-08-16 21:12:07 +00:00
gugug
f88a23acb1 Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: Ib5985049235ee1b6018fc172a67e3b05970a6c42
2020-07-12 11:20:38 +08:00
Zuul
81229eb2c1 Merge "Fix hacking min version to 3.0.1" victoria-em 2020-06-30 04:49:31 +00:00
Zuul
81804a144b Merge "Use unittest.mock instead of third party mock" 2020-06-19 23:12:23 +00:00
Zuul
94fb41d03a Merge "Switch to newer openstackdocstheme and reno versions" 2020-05-21 06:22:50 +00:00
Andreas Jaeger
30199f4f94 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
* parallelizing building of documents

Update Sphinx version as well.

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

Set openstackdocs_pdf_link to link to PDF file.

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.

Depends-On: https://review.opendev.org/729744
Change-Id: I311a5daa382dfca07e618eb6cbb3f44bd0502b02
2020-05-20 21:44:42 +02:00
Andreas Jaeger
7c51d65a43 Fix test-requirements.txt
python_version==2.7 is not supported anymore, remove this line to
unbreak the repo.

Change-Id: I15de57f071a3080239a4418561e4ad610289e478
2020-05-18 19:40:03 +02:00
Zuul
197a7eb9ef Merge "Update the minversion parameter." 2020-05-18 09:19:32 +00:00
Ghanshyam Mann
54f19dc407 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

Also removing the hacking and other related dep from lower-constraints file
as theose are blacklisted requirements and does not need to be present
there.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I636e12ccfb0ad12bfe7f8095cbd196d36902f645
2020-05-15 10:58:02 -05:00
Zuul
ccd2d0ee57 Merge "Add py38 package metadata" 2020-05-05 18:33:11 +00:00
Sean McGinnis
3dc29b4624
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I35b2404890339a4e1f18adf49a2de58d45bb1523
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:55 -05:00
Sean McGinnis
015711745c
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I49640c50a7b78212a5c2ad03acb43be7adf98305
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:17 -05:00
Zuul
f3e4921102 Merge "Add Python3 victoria unit tests" 2020-04-22 23:31:02 +00:00
Zuul
9bfbb7bcdf Merge "Update master for stable/ussuri" 2020-04-22 22:04:04 +00:00
Daniel Bengtsson
d3dd574603 Fix the typo on attribute word.
Fix the typo for the attribute word in comment and docstring.

Change-Id: Ic4a841c333d712a22503c1d7dc2d21619c601408
2020-04-21 23:42:23 +02:00
Sean McGinnis
ee55c043c2
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I7498ea2353cccca7b23d9ef74015a566ac431f90
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:58:31 -05:00
Andreas Jaeger
a9d01eef93 Fix docs publishing
Use sphinx-build so that the output happens in the right place.

Remove ChangeLog, instead link to the release notes.
Use apidoc for API doc building.

Fix main index page display so that title has higher level,
use link to OpenDev.

Change-Id: Iaa8d7f2143d411be31ad10b546455f18015566f3
2020-04-15 11:53:00 +02:00
Zuul
134d0c57f6 Merge "Hacking: Fix F601" 2020-04-15 08:22:32 +00:00
Andreas Jaeger
f107115219 Import os-client-config
keystoneclient-devstack-functional needs os-client-config installed,
file keystoneclient/tests/functional/base.py imports it - but it's not
in test-requirements.txt. Seems that we got it from a dependency in the
past, so make this now explicit.

Change-Id: I44217d614e2ad2238f8f00f2289b1c19f3bf436a
2020-04-14 21:58:16 +02:00
4b0e6cd2ed 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: I3f8b39b40588804dc644de63d792f4178c019a7d
2020-04-11 18:31:11 +00:00
472884f107 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Ia7a2fc64bb5265b8705c33a8447cfaa06f2124c9
Sem-Ver: feature
2020-04-11 18:31:08 +00:00
Daniel Bengtsson
8a8b423e81 Update the minversion parameter.
Update the minversion parameter to use the python -m pip to install
python packages:

https://tox.readthedocs.io/en/latest/changelog.html#id185

It's recommend to use this. Remove the useless install_command
parameter.

Change-Id: I8c6081d58e22db10c62e2706a8fcddfccb3fa69d
2020-04-10 23:04:53 +02:00
Andreas Jaeger
b58ebe2b7f 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 section from setup.cfg: Wheel is not needed for
  python 3 only repo
- Update requirements, no need for python_version anymore
- Remove future import from doc/source/conf.py

Change-Id: Ibf594171cea8f81cc4139b29cbdce54f6d5107a7
2020-04-04 14:15:46 +02:00
Zuul
4fcb68c6b9 Merge "Update master for stable/train" 2020-04-03 20:00:25 +00:00
Andreas Jaeger
98c5c68367 Hacking: Fix F601
Fix F601 failures:
F601 dictionary key '...' repeated with different values

Change-Id: I4c12f5a2348371966215e1ae05b726e6d04b0c8f
2020-03-31 12:18:57 +02:00
Andreas Jaeger
e25df2943d 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: Ic161a8f88c28d88898863e5b9d9380016fbb0d08
2020-03-31 12:16:31 +02:00
Vishakha Agarwal
526350eaee [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-keystoneclient 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: Ib6b6f7ca394dfa78cd5c8aeac0941dd625efef3b
2020-01-22 06:24:24 +00:00
Zuul
925c2c1fb9 Merge "Add support for app cred access rules" 2019-10-10 03:00:19 +00:00
9fbae498aa Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I4809a26e1eab621087a4b00488074f7f706df7ce
Sem-Ver: feature
2019-09-12 09:27:31 +00:00
Zuul
79f150f962 Merge "Generate pdf documentation" 2019-09-11 03:49:12 +00:00