Marc-Andre Lemburg <m...@egenix.com> added the comment:

On 25.11.2020 10:06, Christian Heimes wrote:
> 
> It's not a replacement for platform.linux_distribution().

Right, not even that :-)

It would be an interface to a file /etc/os-release
that's common nowadays, just like /etc/lsb-release was some years
ago. These things change too often to make the stdlib a good fit.
I'm pretty sure distros will invent something new in 5 years which
would then render the API mostly useless again.

To get a sense of the complexity involved in all this, have a look
at how Ansible does this:

https://github.com/ansible/ansible/blob/ea119d30894478b84b5fbe271f580cb2b0401b86/lib/ansible/module_utils/facts/system/distribution.py

It's not just about the file name, the content also needs a lot
of massaging to make it useful for a general purpose API. And
the content quirks are not set in stone either. Here's a ticket
where Debian, for example, drops the version info from the file:

https://github.com/ansible/ansible/issues/19874

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Nov 25 2020)
>>> Python Projects, Coaching and Support ...    https://www.egenix.com/
>>> Python Product Development ...        https://consulting.egenix.com/
________________________________________________________________________

::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               https://www.egenix.com/company/contact/
                     https://www.malemburg.com/

----------
title: Add platform.freedesktop_os_release() -> Add 
platform.freedesktop_osrelease()

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28468>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to