richardforth / apache2buddy

apache2buddy
Apache License 2.0
386 stars 72 forks source link

Newer versions of python throw deprecation warnings #394

Open richardforth opened 2 years ago

richardforth commented 2 years ago

DeprecationWarning: distro.linux_distribution() is deprecated. It should only be used as a compatibility shim with Python's platform.linux_distribution(). Please use distro.id(), distro.version() and distro.name() instead.

richardforth commented 2 years ago

Debian 11:

$ docker run -it forric/debian11:latest /bin/bash
root@e96ff14bccd0:/# python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distro
>>> distro.id()
'debian'
>>> distro.version()
'11'
>>> distro.name()
'Debian GNU/Linux'
>>> distro.codename()
'bullseye'
richardforth commented 2 years ago

Got to do testing to see if this is also backward compatible with older python versions that dont complain currently

richardforth commented 1 year ago

... redacted

richardforth commented 1 year ago

Debian 10

image

Debian 11

image

richardforth commented 1 year ago

Ubuntu 22.04

image