You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/health/collect.py relies on a call to platform.linux_distribution, which has been deprecated since Python 3.5 and was removed on python 3.8 [1].
This results in errors for crm cluster health calls on systems with python >= 3.8.
Until Python 3.7, when platform.linux_distribution was still present and deprecated, the Python docs suggested using distro [3] as an alternative, which could be a solution for this issue. However, distro itself requires python >= 3.6, which could imply losing support for python 3.4 and 3.5 or implementing a fallback logic to use platform.linux_distribution when available.
@athos-ribeiro Thanks for pointing this!
To be honest, the content in scripts/health/collect.py seems duplicated a little, comparing with codes in crmsh/report
So here I want to reuse the function get_distro_info from crmsh/report/utillib.py, see c90a4e6
and #883
scripts/health/collect.py
relies on a call toplatform.linux_distribution
, which has been deprecated since Python 3.5 and was removed on python 3.8 [1].This results in errors for
crm cluster health
calls on systems with python >= 3.8.Until Python 3.7, when
platform.linux_distribution
was still present and deprecated, the Python docs suggested using distro [3] as an alternative, which could be a solution for this issue. However, distro itself requires python >= 3.6, which could imply losing support for python 3.4 and 3.5 or implementing a fallback logic to useplatform.linux_distribution
when available.[1] https://bugs.python.org/issue28167
[2] https://docs.python.org/3.7/library/platform.html#platform.linux_distribution
[3] https://pypi.org/project/distro/
The text was updated successfully, but these errors were encountered: