You are not logged in.

#1 2011-08-13 00:27:46

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 356
Website

python3 forward compatibility

When python2 was the default, most packages/applications asumed this fact, and never considered it might not ALWAYS be the default; hence, they refer to "/usr/bin/python" assuming it would be "python2".

Now python3 is the default, there was a lot of patching to do to fix these python2 apps, *but* python3 applications/packages have the same flaw.

They refer to /usr/bin/python assuming python3 is the default python.  Though this assumption is correct NOW, the day python4 comes out, it'll be the same issue all over again.  Aditionally, if someone sets python2 as his system default, he'll have to modify python3 apps.



I'd like to propose modifying python3-related packages, and have them refer to "/usr/bin/python3" instead of "/usr/bin/python"; specially those that start in "#!/usr/bin/python".
This way, a very distant and future migration to the not-yet-existant python4 will be much less problematic than the migration to python3.  It also allows people to change the default python, without braking anything else.

Offline

#2 2011-08-13 04:00:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: python3 forward compatibility

There isn't much point raising this issue here: if you do want to engage with the developers around this, then use the Arch Dev ML.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2011-08-13 04:09:49

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,648
Website

Re: python3 forward compatibility

That is exactly what http://www.python.org/dev/peps/pep-0394/ encourages packagers to do.   I guess we will follow that once it is fully accepted.   More pressing is getting the naming of python2 modules to be "python2-foo" but that will be a lot easier once pacman-4.0 comes out as it has "replaces" that cna be versioned.

Offline

#4 2011-08-13 04:59:49

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 356
Website

Re: python3 forward compatibility

jasonwryan wrote:

There isn't much point raising this issue here: if you do want to engage with the developers around this, then use the Arch Dev ML.

I guess you're right; I'll do that.


Allan wrote:

That is exactly what http://www.python.org/dev/peps/pep-0394/ encourages packagers to do.   I guess we will follow that once it is fully accepted.   More pressing is getting the naming of python2 modules to be "python2-foo" but that will be a lot easier once pacman-4.0 comes out as it has "replaces" that cna be versioned.

I honestly had no idea of this.  I did search the arch forums and wiki first, but I check for something like this.

These two point are exactly what I meant smile

If the Python 2 interpreter becomes uncommon, scripts should nevertheless continue to use the python3 convention rather that just python. This will ease transition in the event that yet another major version of Python is released.
If these conventions are adhered to, it will be the case that the python command is only executed in an interactive manner.

Offline

Board footer

Powered by FluxBB