This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients benjamin.peterson, bgomes, christian.heimes, doko, draghuram, eric.araujo, georg.brandl, lemburg, pavel.vinogradov, pola, sapetnioc, vstinner, zooko
Date 2014-01-06.08:57:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
None of the linked patch URLs work anymore.

Could someone please upload a current patch to the ticket for review ?

As mentioned before, I don't believe that changing the function to first try the lsb-release will result in the same results as what the functions returns now (for the distributions where it gives correct results).

Furthermore, the file does not appear to be available on all major platforms. Only the lsb-release binary has become somewhat of a standard, so trying the file first, then the lsb-release binary will in most cases result in spawning a process. As example, on openSUSE 11.4, the lsb-release binary reads the /etc/SuSE-release file and then returns these results:

> lsb-release -a
LSB Version:    n/a
Distributor ID: SUSE LINUX
Description:    openSUSE 11.4 (x86_64)
Release:        11.4
Codename:       Celadon

Note that taking these results would result in platform.dist() to return ('SUSE LINUX', '11.4', 'x86_64') instead of the current ('SuSE', '11.4', 'x86_64').

Finally, I think after all these years, the whole concept of linux_distribution() has failed due to the distributions using too many different ways of describing themselves.

I'd be +1 on deprecating the functionality altogether and remove linux_distribution()/dist() in the long run. The functionality is better left to a package which can be updated more easily on PyPI.
Date User Action Args
2014-01-06 08:57:09lemburgsetrecipients: + lemburg, georg.brandl, doko, zooko, vstinner, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes, eric.araujo, pola
2014-01-06 08:57:08lemburgsetmessageid: <>
2014-01-06 08:57:08lemburglinkissue1322 messages
2014-01-06 08:57:08lemburgcreate