Calls to distro.codename() worked as expected in 1.30, but in 1.40 I'm seeing what amounts to truncated output.
Python 3.6.7 on Ubuntu 18.04
1.30 Bionic Beaver
1.40 bionic
Python 3.7.x on Ubuntu 18.10
1.30 Cosmic Cuttlefish
1.40 cosmic
Python 3.7.3 on Ubuntu 19.04
1.30 Disco Dingo
1.40 disco
Python 3.8.2 on Ubuntu 20.04
1.40 focal
I note a possibly breaking change in /etc/os-release, which currently looks like this:
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Output of lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
From the documentation, I thought that, on most Linux distros at least, distro.codename() should produce results identical to awk -F '[()]' '/VERSION=/ {print $2}' /etc/os-release. Is this no longer the case?
Calls to
distro.codename()worked as expected in 1.30, but in 1.40 I'm seeing what amounts to truncated output.Python 3.6.7 on Ubuntu 18.04
1.30 Bionic Beaver
1.40 bionic
Python 3.7.x on Ubuntu 18.10
1.30 Cosmic Cuttlefish
1.40 cosmic
Python 3.7.3 on Ubuntu 19.04
1.30 Disco Dingo
1.40 disco
Python 3.8.2 on Ubuntu 20.04
1.40 focal
I note a possibly breaking change in
/etc/os-release, which currently looks like this:NAME="Ubuntu"VERSION="20.04 LTS (Focal Fossa)"ID=ubuntuID_LIKE=debianPRETTY_NAME="Ubuntu 20.04 LTS"VERSION_ID="20.04"HOME_URL="https://www.ubuntu.com/"SUPPORT_URL="https://help.ubuntu.com/"BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"VERSION_CODENAME=focalUBUNTU_CODENAME=focalOutput of
lsb_release -a:No LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 20.04 LTSRelease: 20.04Codename: focalFrom the documentation, I thought that, on most Linux distros at least,
distro.codename()should produce results identical toawk -F '[()]' '/VERSION=/ {print $2}' /etc/os-release. Is this no longer the case?