Commit Graph

41 Commits

Author SHA1 Message Date
Stephen Finucane 554dc6284c mypy: Address issues with remaining service modules
The changes here are all small enough to be bundled into one.

Change-Id: Ia585244e314a9bd18a7cd2388a2936517e25dbf2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane a7cfc5342f mypy: Address issues with openstack.orchestration
Change-Id: I181b1ddee04b2514283b4d742e74b9bd54790414
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane 4c1ced6ae2 mypy: Address issues with openstack.clustering
This one is cool. We use overload to allow the value of 'Resource.find'
and 'Proxy._find' to vary depending on whether 'ignore_missing' is True
or False.

Change-Id: I386e10774dfb6ec9db80cbda9757446a2b5e4e57
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane b6cc1d817d mypy: Address issues with openstack.baremetal, baremetal_introspection
Yet another bug here: we weren't passing 'session' arguments.

Change-Id: Id9c5bafe8bc71024ff6d453870553dd45b6576d1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane 5d47d65d00 mypy: Address issues with openstack.object_store
Another small bug to be corrected here: SDKException does not have a
'response' attribute.

Change-Id: I084336ba41147f824b92dc07235e5f19b7ac4a9c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane 4f8d4102f5 mypy: Address issues with openstack.network
Just an incorrect type annotation to correct here. We need to figure out
a way to properly type the 'Resource' class with all its magic.

Change-Id: Id238b870de85a4663032710d1c15f6e200d2d543
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane 6c8f2307ae mypy: Address issues with openstack.identity
Another bug highlighted. A test will come later so as not to confuse
this patch.

Change-Id: I38f1a3911781470b77644cd42512408f8c03dc4d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane 4cf4eea21b mypy: Address issues with openstack.block_storage
Our first significant bug! We were registering the 'group_type' module
rather than the 'GroupType' resource in our block storage v3 proxy's
resource registry. This is corrected. The rest of the changes are simply
to work around mypy (obviously) not being able to detect the key and
value types for empty dicts. Cinder doesn't care about the values of the
dict for most WSGI actions so this doesn't matter.

Change-Id: I4d9a4d4fcf08e8aa13b47314b24b2bb7226be3eb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Stephen Finucane bbe8518c8c mypy: Address issues with openstack.image
Change-Id: I361ab5c4ecb5b22bf794025d0a0039068783d788
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-09 10:54:07 +00:00
Zuul 9417ae74b7 Merge "mypy: Address issues with openstack.compute" 2024-01-08 20:57:28 +00:00
Stephen Finucane 478f5b9c46 mypy: Address issues with openstack.compute
Change-Id: Iabc2f7dafb1254395a6249cdfcda6fd444941812
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-11 17:29:00 +00:00
Stephen Finucane f440047475 Drop support for Python 3.6
This was in-effect already dropped with the introduction of the
dependency on platformdirs > 3.0. This just makes it official.

Change-Id: I18806e78fe1491948948d224edb27d6ac4a8f45f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-06 10:55:37 +00:00
Stephen Finucane c9a877e2de Run mypy as pre-commit
Note that mypy is the last item in the list of checks since flake8 is
going to catch e.g. syntax issues which should be addressed first.

Change-Id: Id58fb9e8ea454c10e502c96ad4c36788e7533318
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-08-17 11:47:40 +01:00
songwenping 6a08c2b293 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

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

Change-Id: Ie56b576971d75a6fde7088a74e4e2cea0178284a
2021-12-22 08:38:04 +00:00
wu.shiming 8ed2d10019 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  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: I6974592dc7cd44a749986ec0373afddc48d43b78
2021-05-12 09:54:38 +08:00
Monty Taylor 3ee25df9e7 Drop python3.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: Iaa761cb6f6ab30fa26f6587ac29f11274702e1a3
2020-06-25 07:36:36 -05:00
Hervé Beraud 632db25246 Refresh python versions
Introduce support of python 3.8 and move tox and jobs to py38.

jsonschema 3.2.0 [1] support python 3.8

[1] https://github.com/Julian/jsonschema/pull/627

Change-Id: Ibcfa044dd0f3b29fd290559795ea1d98e194e886
2020-05-26 10:36:06 +02:00
Andreas Jaeger 4c5cf2deea Small cleanups after Python2 drop
Remove requirements only needed by Python prior to version 3.5.
Remove python 2.7 code from setup.py.

Remove from setup.py ancient sections.

Change-Id: Ie223b743a0f8def53874bfbbb5f9000ad26f030b
2020-03-27 23:49:45 +00:00
Monty Taylor 185e55bd77 Add python-requires entry indicating 3.5 is required
We require 3.5 now but we didn't add the metadata. Add it.

While OpenStack broadly only supports 3.6, openstacksdk
has a wider audience, including nodepool which still uses
3.5. So add the 3.5 unit tests back.

Use lower-constraints for py35 unit tests because the
upper-constraints have versions of things that have
droppped py35 support already.

Depends-On: https://review.opendev.org/#/c/715467/
Change-Id: I680e0bab5ba3af7be5e914ece64c6bd25d1f2191
2020-03-27 12:13:24 -05:00
Monty Taylor e9107c190b Stop supporting python2
We're peeling python2 from libraries now, so Stop running python2
versions of test jobs. Leaving removing the test jobs themselves
for the moment as they're still used in other repos.

Change-Id: Ic6d56e3636b757201d83649f075005ed3ae1e1a6
2019-12-16 11:00:22 -05:00
Andreas Jaeger 7d25db2610 Update links
The openstacksdk docs are published at docs.o.o, not developer.o.o since
quite some time. Fix links to point to current version of docs.

Add missing links, thus removing some TODOs.

Change-Id: I5e3b4c70bc0875a1dfcc587b60a95258a61b4407
2019-07-30 07:15:55 +02:00
Corey Bryant 832e436891 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: Ib55d9c890de62bdfe269390c5533144e46e92703
Story: #2005924
Task: #34233
2019-07-05 14:34:50 -04:00
qingszhao 65fd4a9442 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I57ae41d3349c26c660a3a208cb590295f1a7e375
2018-12-04 17:19:57 +00:00
Monty Taylor be87ac1d9b
Add python 3.6 jobs
3.6 is the future. Let's test it today.

Change-Id: I1c240f10e42fadbdaed78b07ff26fde52c11f8cd
2018-05-09 11:53:30 -05:00
Monty Taylor f44ed7ab35
Update python-openstacksdk references to openstacksdk
Now that the repo is renamed, update all of the references.
While we're at it, remote unused translation config.

Change-Id: Ib9f80eb809317483f83f79952470c2b57b2bb7c6
2018-03-23 12:31:24 -05:00
Monty Taylor a4ee1a3f09
Merge tox, tests and other support files
Change-Id: I5a4759e36089f1f4fab0c75412c94d051d8b16a7
2017-10-04 14:51:08 -05:00
Monty Taylor 65293358a0
Move shade and os-client-config python content
Make shade be openstack.cloud and os-client-config be openstack.config.

Change-Id: I1d28be82a72cc1a30d6be306257fc1f0736ed604
2017-10-04 12:39:43 -05:00
Vu Cong Tuan a66826ee7b Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: If2aba189704c310ea4fcb805589e2732a525e992
2017-06-07 10:38:31 +07:00
Akihiro Motoki 7ed0e21bd3 Fix document warnings
Also warning-is-error is set in setup.cfg to avoid future warnings.

Change-Id: I4381a47d35b5736c9af0a2cb8bdd330266825922
2017-04-29 17:32:42 +00:00
Tony Xu 79de7d9dd4 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: I5c5cdf59c32052e051fe3c586074aec7c5f2347f
2016-10-25 22:38:40 +08:00
Tony Xu 144bcb5d53 Update homepage with developer documentation page
Change-Id: Id480bddde4b05412cbd159dad7b9b5402b76b5e2
2016-09-27 00:29:18 +08:00
Doug Hellmann 00baca6b39 remove python 2.6 trove classifier
OpenStack projects are no longer being tested under Python 2.6, so
remove the trove classifier implying that this project supports 2.6.

Change-Id: I2147b18fd9ecc32eef3c8670e33def2a702e7d20
2015-12-23 01:31:15 +00:00
TerryHowe a0e791b775 Keystone auth integration
Keystoneauth integration.

Change-Id: I692705731c02b2c3abf1643c5b12dfa1c7da05cf
2015-11-19 19:10:42 -07:00
TerryHowe 5c5e512991 Change auth plugin names to match KSA
The names of the plugins should match KSA and KSC.

Change-Id: I2f8633523bd596904f8eeb818c216daa923ace64
2015-07-15 12:20:23 -06:00
Brian Curtin c23fa19457 Rename project to openstacksdk
Prepare for the next release and set the package name to openstacksdk
and drop the python- prefix. This package name has already been reserved
on PyPI.

This was initially started by a discussion at the summit around
OpenStackClient making the same move to strip the python- prefix
(they haven't completed it, but have reserved the PyPI name).
It was further discussed on IRC and I believe in a meeting that
there is no benefit to having the python- prefix here. There is
no name collision we're avoiding with it, and it provides
nothing extra by being prefixed as such.

Change-Id: I1145883a2f896769143a3fcc6e43468d6e590e11
2015-06-16 17:30:25 +00:00
Terry Howe d0fefa03e1 Revert to KSC auth plugins
Way back at the Summit I said I'd revert back to the standard
KSC auth plugins.  Well here, they are.

Change-Id: I8acc2be3f2ac7d10b6914f892d9f0bfe734496fd
2015-02-17 15:12:59 -07:00
Brian Curtin d299da56cf Update README and setup text for PyPI
This change updates the README text that shows up on PyPI so we can get
a small example up there as well as the documentation link. It also
marks 3.4 as supported, since we've been testing that for a while now.

Change-Id: I28555eb4e121f35151afc8548adb3df166257814
Closes-Bug: 1420858
2015-02-11 10:25:48 -06:00
Terry Howe 72210d2ee6 Create a discoverable plugin
Move the version detection code into a plugin because it
does not belong in connection.  Create a new discoverable plugin
that looks at the auth_url and makes a best guess if it should
use v2 or v3 auth.

The plugin also now accepts access_info so a cached version
of the authorization can be reproduced without hitting
keystone.

Change-Id: Ia5d32457c90716627a75be2c99267c4ed7903197
2014-11-13 08:11:58 -07:00
Terry Howe 836b9e852d Use stevedore to load authorization plugins
Add basic infrastructure to load authorization plugins with
stevedore.

Change-Id: I4828be6537bbe865b43ec43de41f6060ea8f2c98
2014-10-06 10:06:09 -06:00
Alex Gaynor e0e8ad2fd9 Mark openstacksdk as being a universal wheel
Change-Id: Ib3a686d4d5d594ac23b4018036af4b05ae948829
2014-05-21 16:28:25 -07:00
Jesse Noller e0418241a3 setting up the initial layout; move the api proposals to api_strawman
Change-Id: I7c933d5e023c2a98a64aa90ed209f1e25d07f0d9
2014-01-24 22:58:25 -06:00