Python 2/3 and update-alternatives

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Python 2/3 and update-alternatives

Thomas Schraitle-3
Hi,

I'm wondering, why the python packages for version 2 and 3 don't use the
update-alternatives script.

Any reason for this?

I haven't found anything in the package itself nor on mailing lists. Probably
I've missed some.

Maybe this was on purpose as Python2 isn't a complete replacement for Python3
(and vice versa). On the other side, I assume, not all Java runtime
environments are always compatible. However, still, you can use this:

# update-alternatives --display java
java - auto mode
  link best version is /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
  link currently points to /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
  link java is /usr/bin/java
[...]

# update-alternatives --display python
update-alternatives: error: no alternatives for python

(executed on openSUSE Tumbleweed)

Bug? Feature? Design decision? Hope someone can enlighten me. :))

Thanks!

--
Gruß/Regards,
    Thomas Schraitle

----------------------------------------------------------------------
SUSE LINUX Products GmbH    (o<
Maxfeldstrasse 5            /\\    Documentation Specialist
90409 Nuernberg, Germany   _\_v    http://www.suse.com | HRB 21284
SUSE LINUX GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu,
                     Graham Norton, HRB 21284 (AG Nürnberg)

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Python 2/3 and update-alternatives

Karl Cheng
On 5 November 2017 at 22:54, Thomas Schraitle <[hidden email]> wrote:
> Hi,
>
> I'm wondering, why the python packages for version 2 and 3 don't use the
> update-alternatives script.
>
> Any reason for this?

I believe there are a number of packages that just reference
"/usr/bin/python", which such a change would break.

There's a long discussion about changing default Python version to
Python 3 here: https://lists.opensuse.org/opensuse-factory/2017-06/msg00743.html

> [snip]
>
> Bug? Feature? Design decision? Hope someone can enlighten me. :))
>
> Thanks!



--
- Karl Cheng (Qantas94Heavy)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Python 2/3 and update-alternatives

Stephan Kulow-3
In reply to this post by Thomas Schraitle-3
Am 05.11.2017 um 12:54 schrieb Thomas Schraitle:
> Hi,
>
> I'm wondering, why the python packages for version 2 and 3 don't use the
> update-alternatives script.
>
> Any reason for this?
>
> I haven't found anything in the package itself nor on mailing lists. Probably
> I've missed some.
You just looked at the wrong lists then - the discussion was heated :)

>
> Maybe this was on purpose as Python2 isn't a complete replacement for Python3
> (and vice versa). On the other side, I assume, not all Java runtime
> environments are always compatible. However, still, you can use this:
The java runtimes are supposed to be compatible. They might error out if
the target version of the jar is unsupported, but the (discussed)
problem with python 2 and 3 is that they might interpret the same syntax
differently - and not error out, but create hidden bugs.

Greetings, Stephan

--
Ma muaß weiterkämpfen, kämpfen bis zum Umfalln, a wenn die
ganze Welt an Arsch offen hat, oder grad deswegn.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Python 2/3 and update-alternatives

Thomas Schraitle-3
In reply to this post by Thomas Schraitle-3
Hi,

> [...]
> # update-alternatives --display python
> update-alternatives: error: no alternatives for python
>
> (executed on openSUSE Tumbleweed)
>
> Bug? Feature? Design decision? Hope someone can enlighten me. :))

Thanks Stephan and Karl for the pointers!

Indeed, I looked at the wrong list. :))


--
Gruß/Regards,
    Thomas Schraitle

----------------------------------------------------------------------
SUSE LINUX GmbH              (o<  
Maxfeldstrasse 5             /\\      Documentation Specialist
90409 Nuernberg, Germany    _\_v      http://www.suse.com
http://lizards.opensuse.org/author/thomas-schraitle/
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton,
    HRB 21284 (AG Nürnberg)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Python 2/3 and update-alternatives

Kristoffer Grönlund
Thomas Schraitle <[hidden email]> writes:

> Hi,
>
>> [...]
>> # update-alternatives --display python
>> update-alternatives: error: no alternatives for python
>>
>> (executed on openSUSE Tumbleweed)
>>
>> Bug? Feature? Design decision? Hope someone can enlighten me. :))
>
> Thanks Stephan and Karl for the pointers!
>
> Indeed, I looked at the wrong list. :))

There is also an upstream discussion around this which might be
interesting:

https://www.python.org/dev/peps/pep-0394/

Cheers,
Kristoffer

>
>
> --
> Gruß/Regards,
>     Thomas Schraitle
>
> ----------------------------------------------------------------------
> SUSE LINUX GmbH              (o<  
> Maxfeldstrasse 5             /\\      Documentation Specialist
> 90409 Nuernberg, Germany    _\_v      http://www.suse.com
> http://lizards.opensuse.org/author/thomas-schraitle/
> GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton,
>     HRB 21284 (AG Nürnberg)
> --
> To unsubscribe, e-mail: [hidden email]
> To contact the owner, e-mail: [hidden email]
>
>

--
// Kristoffer Grönlund
// [hidden email]
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]