Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 as default python #4950

Closed
FlyingWombat opened this issue Feb 6, 2019 · 8 comments
Closed

Python 3 as default python #4950

FlyingWombat opened this issue Feb 6, 2019 · 8 comments
Labels

Comments

@FlyingWombat
Copy link

FlyingWombat commented Feb 6, 2019

I suggest that Python 3 be made the default python target in Msys2.
Python 2 End of Life is about 10 months from now.

Arch Linux can be used as a reference for this, as they have had python3 as default for quite some time now.

Edit:
To clarify, I think /mingw64/bin/python --version should return python 3.7.2 (or whatever latest version).
Instead, /mingw64/bin/python --version returns python 2.7.15
I understand this was done to preserve compatibility with legacy python programs. IMO it is a backwards way of doing things. I think this not just for python, but for any program: foo should execute the latest installed version, and older versions should be installed as fooX.Y.

One way this change could be made is to add a statement in the prepare() of every python2 PKGBUILD, to patch the shebang to target python2 explicitly.

@lazka lazka added the python label Feb 12, 2019
@lazka
Copy link
Member

lazka commented Feb 14, 2019

I assume you mean the binary name? There is a new discussion upstream https://mail.python.org/pipermail/python-dev/2019-February/156272.html for changing PEP 394

@FlyingWombat
Copy link
Author

Yes
OP edited for clarification

@asctime
Copy link
Contributor

asctime commented Mar 19, 2019

cd bin; cp python3.exe python.exe ?
Anything further probably means you are wrong. Because OS file associations and internal scripts should always target the unversioned pointer image.. unless you have specific reason to call a specific image version in a script - in which case this discussion is moot anyway.

@FlyingWombat
Copy link
Author

FlyingWombat commented Mar 21, 2019

OS file associations and internal scripts should always target the unversioned pointer image

That's my point.
For MSYS2-MINGW64, the unversioned python binary refers to an outdated version that is nearing end-of-life.
I think that the unversioned python binary should refer to the latest version of python.

For reference, here is part of the upstream discussion on this.
python/peps#893

@lazka
Copy link
Member

lazka commented May 3, 2019

Once we get rid of python2 (#4993) we can switch python.exe over to python3, imo.

@lazka
Copy link
Member

lazka commented Jul 9, 2019

python/peps#989 -> python can now point to python3

  • Move python.exe from python2 to python3
  • Move pip.exe from python2-pip to python3-pip

lazka added a commit to lazka/MINGW-packages that referenced this issue Jul 24, 2019
This moves pip.exe from python2-pip to python3-pip and makes it
the Python 3 version.

See msys2#4950
@lazka
Copy link
Member

lazka commented Jul 24, 2019

#5640 moves pip.exe

@lazka
Copy link
Member

lazka commented Aug 15, 2019

python.exe is Python3 since 228cc0c

The remaining scripts are moved in #5723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants