[Metrics] Hide deprecated metrics (#15458)
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
@@ -28,4 +28,13 @@ def _prev_minor_version_was(version_str):
|
||||
return True
|
||||
|
||||
# Note - this won't do the right thing when we release 1.0!
|
||||
assert __version_tuple__[0] == 0
|
||||
assert isinstance(__version_tuple__[1], int)
|
||||
return version_str == f"{__version_tuple__[0]}.{__version_tuple__[1] - 1}"
|
||||
|
||||
|
||||
def _prev_minor_version():
|
||||
"""For the purpose of testing, return a previous minor version number."""
|
||||
# In dev tree, this will return "0.-1", but that will work fine"
|
||||
assert isinstance(__version_tuple__[1], int)
|
||||
return f"{__version_tuple__[0]}.{__version_tuple__[1] - 1}"
|
||||
|
||||
Reference in New Issue
Block a user