Deprecate version module

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ia9e48a6bbf4527b00eb15788a8dd5224998a7b2b
This commit is contained in:
Stephen Finucane
2026-05-07 12:49:43 +01:00
parent 192b3708a9
commit 43a6c8431c
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -12,7 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
import warnings
import pbr.version
warnings.warn(
f'The {__name__} module is deprecated. Prefer use of importlib.metadata '
f'to inspect version information for packages.',
DeprecationWarning,
)
version_info = pbr.version.VersionInfo('oslo.rootwrap')
@@ -0,0 +1,6 @@
---
deprecations:
- |
The ``oslo_rootwrap.version`` module and associated objects has been
deprecated for removal. Prefer use of ``importlib.metadata`` to inspect
version information for installed packages.