api: Deprecate BaseAPI

We do not want to maintain this anymore. codesearch.o.o shows two
users.

Change-Id: Ic925fa40b099a04fa4904b894d8c54f3c8e4b6da
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-02-19 20:12:33 +00:00
parent 3d221e5992
commit 0fc2851044
2 changed files with 13 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
import builtins
import typing as ty
import warnings
from keystoneauth1 import exceptions as ksa_exceptions
from keystoneauth1 import session as ksa_session
@@ -65,6 +66,12 @@ class BaseAPI:
Keyword arguments passed to keystoneauth1.session.Session().
"""
warnings.warn(
'The BaseAPI class is deprecated for removal. Consider using '
'openstacksdk instead else vendoring this code into your client',
category=DeprecationWarning,
)
super().__init__()
# Create a keystoneauth1.session.Session if one is not supplied

View File

@@ -0,0 +1,6 @@
---
deprecations:
- |
The ``osc_lib.api.api.BaseAPI`` class has been deprecated for removal.
Consider using ``openstacksdk`` instead or vendoring the class into
your client.