Package: installation-birthday Version: 12 Severity: normal Dear Maintainer,
Upon notification of a system's birthday the notification includes a message notifying that the platform library is deprecated by emitting the following message: /usr/bin/installation-birthday:92: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 distname=platform.linux_distribution()[0].title(), An attempt was made to replace the 'platform' library. Any feedback is appreciated. -- System Information: Debian Release: 10.1 APT prefers stable APT policy: (990, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-6-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages installation-birthday depends on: ii e2fsprogs 1.44.5-1+deb10u1 ii python3 3.7.3-1 installation-birthday recommends no packages. installation-birthday suggests no packages. -- no debconf information
--- installation-birthday 2019-09-19 10:09:31.259310438 -0400 +++ installation-birthday_new 2019-09-19 10:08:22.161650644 -0400 @@ -25,7 +25,8 @@ import logging import argparse import datetime -import platform +import distro +import socket import subprocess DESCRIPTION = "Receive congratulations on system installation anniversaries." @@ -51,7 +52,6 @@ Congratulations, your {distname} system "{node}" was installed {age} year(s) ago today! - Best wishes, Your local system administrator @@ -88,8 +88,8 @@ print(TEMPLATE.format( age=age, - node=platform.node(), - distname=platform.linux_distribution()[0].title(), + distname=distro.os_release_info()['name'], + node=socket.gethostname() )) return 0