Since Python 3.5, platform.linux_distribution is deprecated , and in
Python 3.8 it has been removed entirely. The supposed replacement is
from the package distro. Unfortunately this adds another dependency to
the tests, but only on Linux (I think).
An alternative would be to assume that any distribution new enough to have Python 3.8 also has /etc/os-release, so we fall back to parsing that if platform.linux_distribution isn't there. Or the other way around: we check for /etc/os-release and fall back to platform.linux_distribution.
It is supported on 2.7, see https://pypi.org/project/distro/.
An alternative to this change would be to assume that distributions recent enough to have Python 3.8 also have /etc/os-release, which has become somewhat of a standard. So we could check if that file exists, then use it if it does and fallback to platform.linux_distribution() if it doesn't. Then we wouldn't need an additional dependency.