[issue1322] platform.dist() has unpredictable result under Linux

2014-08-05 Thread Berker Peksag
Berker Peksag added the comment: Here's an updated patch (based on Vajrasky's patch, thanks!). Changes: - Updated deprecation schedule 1. pending deprecation in 3.5 2. deprecation in 3.6 3. removal in 3.7 - Added tests - Added a whatsnew entry - Moved warnings import to dist() and linux_d

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review. Attached the patch to address Marc-Andre Lemburg's concern. -- Added file: http://bugs.python.org/file4/deprecate_platform_dist_v2.patch ___ Python tracker

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.01.2014 11:53, Vajrasky Kok wrote: > > Here is the patch to deprecate platform.dist and platform.linux_distribution. > > -- > nosy: +vajrasky > Added file: http://bugs.python.org/file33324/deprecate_platform_dist.patch Thanks. I think we'll n

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch to deprecate platform.dist and platform.linux_distribution. -- nosy: +vajrasky Added file: http://bugs.python.org/file33324/deprecate_platform_dist.patch ___ Python tracker

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Matthias Klose
Matthias Klose added the comment: sure, then please let's deprecate that for 3.4, and remove in 3.5. /etc/os-release introduce the next set of different names. -- ___ Python tracker ___

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Another example on openSUSE 12.3: # lsb-release -a LSB Version:n/a Distributor ID: openSUSE project Description:openSUSE 12.3 (x86_64) Release:12.3 Codename: Dartmouth This would result in ('openSUSE project', '11.4', 'x86_64'). I don'

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: 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 func

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-05 Thread Matthias Klose
Matthias Klose added the comment: Victor, what should be returned if the code name is not set? None, empty string, or the description field of the lsb-release file? -- ___ Python tracker ___

[issue1322] platform.dist() has unpredictable result under Linux

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: http://patch-tracker.debian.org/patch/series/view/python3.2/3.2.1~rc1-1/platform-lsbrelease.diff This patch fails if "(?:DISTRIB_CODENAME\s*=)\s*(.*)" regex doesn't match (_u_id variable is not set). -- nosy: +haypo __

[issue1322] platform.dist() has unpredictable result under Linux

2011-05-30 Thread Éric Araujo
Éric Araujo added the comment: FTR, doko applied this patch for Debian and Ubuntu: http://patch-tracker.debian.org/patch/series/view/python3.2/3.2.1~rc1-1/platform-lsbrelease.diff -- versions: +Python 3.3 -Python 3.1 ___ Python tracker

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-22 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: There seems to be some mistake, re #msg134219 and #msg134255. The current version of may patch *does* avoid the cost of a subprocess in the common case. I described this new strategy in #msg73744 and as far as I know it satisfies all of MAL's earlier obj

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-22 Thread Éric Araujo
Éric Araujo added the comment: The hard part was supporting distro-specific release files; I think that now most of them provide the lsb_release info. If it proves more complicated than that, then let’s deprecate the function. -- ___ Python tracke

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > [Zooko] >> I just read back through this ticket, but I didn't understand exactly >> what MAL wanted to have different from what this Python function >> currently does: > > It may be this: > >> It

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-21 Thread Éric Araujo
Éric Araujo added the comment: [Zooko] > I just read back through this ticket, but I didn't understand exactly > what MAL wanted to have different from what this Python function > currently does: It may be this: > It's better to follow the approach taken by lsb_release and then > add calling l

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-20 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: For what it is worth, here is the current version of this code that we are using in Tahoe-LAFS: http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/__init__.py?annotate=blame&rev=5033#L36 You can see the results on our buildbot: http://tah

[issue1322] platform.dist() has unpredictable result under Linux

2011-04-20 Thread pola
pola added the comment: Has there been any progress on incorporating the suggested here patch? A suggested patch is found here also: http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=216 And a patch is applied to python in ubuntu packages: see reference - https

[issue1322] platform.dist() has unpredictable result under Linux

2010-09-18 Thread Mark Lawrence
Changes by Mark Lawrence : -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 ___ Python tracker ___ ___ Python-b

[issue1322] platform.dist() has unpredictable result under Linux

2010-06-25 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue1322] platform.dist() has unpredictable result under Linux

2010-06-25 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file8609/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-20 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: I just read back through this ticket, but I didn't understand exactly what MAL wanted to have different from what this Python function currently does: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7f-f74fc964ebd9d3

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-03-18 18:13, Matthias Klose wrote: > Matthias Klose added the comment: > > MAL, please can we add zooko's patch in some form? The current > implementation assumes an implementation, which doesn't exist on all > platforms, and just dividing linux di

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: doko: thanks for your interest encouraging more formal and generic solutions to this. For what it is worth, the current version of my patch (used in Tahoe) is here: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Matthias Klose
Changes by Matthias Klose : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Matthias Klose
Matthias Klose added the comment: MAL, please can we add zooko's patch in some form? The current implementation assumes an implementation, which doesn't exist on all platforms, and just dividing linux distributions in "unsupported" and "supported" seems to be odd. You cite some URL's in platfor

[issue1322] platform.dist() has unpredictable result under Linux

2008-10-05 Thread Matthias Klose
Matthias Klose <[EMAIL PROTECTED]> added the comment: /etc/lsb-release is not yet specified by the lsb. See https://lists.linux-foundation.org/pipermail/lsb-discuss/2008-March/004842.html https://lists.linux-foundation.org/pipermail/lsb-discuss/2008-March/004843.html https://lists.linux-foundati

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-24 Thread Zooko O'Whielacronx
Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: Well, for what it is worth I've updated the custom "detect linux distribution" code in Tahoe yet again. The current version first tries to parse /etc/lsb-version (fast, gives a good answer on Ubuntu, and hopefully at least semi-standardi

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-09-23 22:19, Zooko O'Whielacronx wrote: > Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: > >> Because that's exactly what lsb_release does as well. I have to correct that: lsb_release will only look at the other relea

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Zooko O'Whielacronx
Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: > Because that's exactly what lsb_release does as well. You must know something about common lsb_release implementations that I don't. As far as I saw in the LSB documentation, it is required to print out information in a certain format

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-09-23 21:49, Zooko O'Whielacronx wrote: > Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: > > MAL: why do you say it is better to look for > /etc/$supportedplatform-release files first instead of looking for > /etc/lsb

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Zooko O'Whielacronx
Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: MAL: why do you say it is better to look for /etc/$supportedplatform-release files first instead of looking for /etc/lsb-release first? I do not know if /etc/lsb-release is suitably generic -- I've tried it only on a few platforms. I d

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Zooko O'Whielacronx
Changes by Zooko O'Whielacronx <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11574/dist.patch.txt ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Zooko O'Whielacronx
Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: Okay, per MAL's request over on #3937, I tried platform.get_linux_distribution() on the current svn trunk (which I assume is the version that is about to become python 2.6). It gave the same not-so-great answer as platform.dist() used to

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Zooko, I think the main reason for the parser in platform.py to fail on Ubuntu is that Ubuntu doesn't ship with a /etc/ubuntu-release file and instead uses the optional override parameters in /etc/lsb-release to setup the distribution valu

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Zooko O'Whielacronx
Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: Please see also #3937 for a patch which first tries to parse "/etc/lsb-release", then tries to execute "lsb_release", then falls back to the old behavior of platform.dist(). (Note that parsing the file named /etc/lsb-release is not guara

[issue1322] platform.dist() has unpredictable result under Linux

2008-09-23 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: -- dependencies: +platform.dist(): detect Linux distribution version in a robust, standard way ___ Python tracker <[EMAIL PROTECTED]>

[issue1322] platform.dist() has unpredictable result under Linux

2008-07-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Also note that linux_distribution() will use the parsed distro name from the release file per default (full_distribution_name=1), so the problem described in the original ticket description should no longer be relevant: all release files p

[issue1322] platform.dist() has unpredictable result under Linux

2008-07-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Please see the top of platform.py: #This module is maintained by Marc-Andre Lemburg <[EMAIL PROTECTED]>. #If you find problems, please submit bug reports/patches via the #Python SourceForge Project Page and assign them to "lem

[issue1322] platform.dist() has unpredictable result under Linux

2008-05-18 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Christian was reviewing this for GHOP. -- assignee: georg.brandl -> christian.heimes nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]> __

[issue1322] platform.dist() has unpredictable result under Linux

2008-05-11 Thread Bruno Gomes
Bruno Gomes <[EMAIL PROTECTED]> added the comment: In this fix I removed the use of the file name in order to return the distname. Now, only the file contents is taken into account. On Centos, the file name is the same as on Redhat, but its contents is different: $ cat /etc/redhat-release CentO

[issue1322] platform.dist() has unpredictable result under Linux

2008-02-23 Thread Pavel Vinogradov
Pavel Vinogradov added the comment: You can see confirmation from Georg on thread in GHOP: http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=216&can=1&colspec=ID%20Status%20ClaimedBy%20Due%20NeedsReview%20Summary#c20 I can update patch for 3.0 (it don't applies now)

[issue1322] platform.dist() has unpredictable result under Linux

2008-02-23 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: tiran -> georg.brandl keywords: +patch nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___ Pytho

[issue1322] platform.dist() has unpredictable result under Linux

2008-02-23 Thread Christian Heimes
Christian Heimes added the comment: Thanks Pavel! First I need confirmation from the GHOP project and Georg that you have submitted the contributor form. Then I'm going to merge your patch. __ Tracker <[EMAIL PROTECTED]>

[issue1322] platform.dist() has unpredictable result under Linux

2008-02-23 Thread Pavel Vinogradov
Pavel Vinogradov added the comment: I'm work on this issue in GHOP(http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=216&can=1&colspec=ID%20Status%20ClaimedBy%20Due%20NeedsReview%20Summary) I'm attach updated patch for python trunk. This patch fixes issue and add addi

[issue1322] platform.dist() has unpredictable result under Linux

2007-12-10 Thread Christian Heimes
Christian Heimes added the comment: I'm mentoring a task for GHOP which is going to fix the problem. -- assignee: -> tiran priority: -> normal versions: +Python 3.0 __ Tracker <[EMAIL PROTECTED]> __

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-30 Thread Christian Heimes
Changes by Christian Heimes: -- components: +Library (Lib), Tests versions: +Python 2.6 -Python 2.5 Added file: http://bugs.python.org/file8664/platform_py25.patch __ Tracker <[EMAIL PROTECTED]> _

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-30 Thread Christian Heimes
Christian Heimes added the comment: Yann Cointepas wrote: > I joined a modified version of platform.py. Here is a summary of the > modification: > - replaced '/etc' by global variable _etc_dir > - removed supported_dists parameter of dist() > - each element of dist() result is searched in the fol

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-26 Thread Christian Heimes
Christian Heimes added the comment: > Can you also use a global variable instead of "/etc"? Something like > ETC_DIR = "/etc" for example. It would allow you to ship samples from > several distribution and run unit tests against each. I've attached the two relevant files from Ubuntu 7.10 Gutsy.

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-26 Thread Christian Heimes
Christian Heimes added the comment: > I am writing a patch but I have a few questions: > > 1) There are at most three places where the distribution name can be > found. What is the priority order to select only one name ? > The three places are: > a) Inside the /etc/lsb-release file > b) In

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-26 Thread Yann Cointepas
Yann Cointepas added the comment: I am writing a patch but I have a few questions: 1) There are at most three places where the distribution name can be found. What is the priority order to select only one name ? The three places are: a) Inside the /etc/lsb-release file b) In the name of the

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: [EMAIL PROTECTED]:~$ /usr/bin/lsb_release -a LSB Version: core-2.0-noarch:core-3.0-noarch:core-3.1-noarch:core-2.0-ia32:core-3.0-ia32:core-3.1-ia32:cxx-2.0-noarch:cxx-3.0-noarch:cxx-3.1-noarch:cxx-2.0-ia32:cxx-3.0-ia32:cxx-3.1-ia32:graphics-2.0-noarch:graphi

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: > Ony my Ubuntu box lsb_release is just a small Python script that parses > /etc/lsb-release. I suggest that your read the LSB standards about the > file and use the information to parse it instead of invoking a program. Can you please check if it supports

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Ony my Ubuntu box lsb_release is just a small Python script that parses /etc/lsb-release. I suggest that your read the LSB standards about the file and use the information to parse it instead of invoking a program. -- nosy: +tiran

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: -gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: On 10/25/07, Yann Cointepas <[EMAIL PROTECTED]> wrote: > I can easily do the patch to ignore symlinks and /etc/lsb-release but I am > not sure of the appropriate way to look for lsb_update command, is > distutils.spawn.find_executable( 'lsb_release' ) ok ?

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Yann Cointepas
Yann Cointepas added the comment: I can easily do the patch to ignore symlinks and /etc/lsb-release but I am not sure of the appropriate way to look for lsb_update command, is distutils.spawn.find_executable( 'lsb_release' ) ok ? If you need the patch earlier than begining of next week, you shoul

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I think it is safe to ignore lsb-release. In fact, there seems to be a command "lsb_release" that gives information about distribution. On my SuSE box, this is what I get: marvin:~# lsb_release -i Distributor ID: SUSE LINUX marvin:~# lsb_release -d Descrip

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-24 Thread Guido van Rossum
Guido van Rossum added the comment: Do you have a patch? That would help tremendously. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ __

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-24 Thread Yann Cointepas
New submission from Yann Cointepas: The distribution name returned by platform.dist() depends on the order of os.path.listdir( '/etc' ). It selects the first file matching the regex r'(\w+)[-_](release|version)' and takes part of the file name (i.e. matchResult.groups()[0]) as distribution name.