-
Notifications
You must be signed in to change notification settings - Fork 528
Added pyenv-latest support. #493
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
Added pyenv-latest support. #493
Conversation
Usage and behavior is the same as in the original version of pyenv-latest. Prefix auto-resolution to the latest version also turned on for such commands: install, global, local So, from now user can just execute the following commands without the need of searching for latest patch version (or even minor) pyenv install 3.10 pyenv global 3.10
4b9b228
to
55d5d08
Compare
Hey, @kirankotari feel free to drop some comments so I can make a fix. I really want this feature :) At this point I see the only problem in btw, my changes did nothing to the old-styled commands, it is still possible to use install/global/local by providing full version name, so no conflicts and all tests pass fine |
2d8879b
to
b0e955c
Compare
From now it may pin python version without patch. Also fixed pyenv-install without arguments: it should pick the local/global version and then install it.
…pyenv-latest-feature
Sooo I noticed the #505 issue and decided to work on it, because I think it is the part of It's still possible to use the exact version... PS C:\Users\uhx\Projects\pyenv-win> .\pyenv-win\bin\pyenv.bat local 3.11.2-win32
PS C:\Users\uhx\Projects\pyenv-win> type .\.python-version
3.11.2-win32
PS C:\Users\uhx\Projects\pyenv-win> .\pyenv-win\bin\pyenv.bat exec python -c "import sys; print(sys.version)"
3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:24:28) [MSC v.1934 32 bit (Intel)] But from now you can pin just a minor (or major) version and run install / exec PS C:\Users\uhx\Projects\pyenv-win> .\pyenv-win\bin\pyenv.bat local
3.7
PS C:\Users\uhx\Projects\pyenv-win> .\pyenv-win\bin\pyenv.bat install
:: [Info] :: Mirror: https://www.python.org/ftp/python
:: [Installing] :: 3.7.9 ...
:: [Info] :: completed! 3.7.9
PS C:\Users\uhx\Projects\pyenv-win> .\pyenv-win\bin\pyenv.bat exec python --version
Python 3.7.9 So the root@f2a41ae37ecf:~# /root/.pyenv/bin/pyenv local 3.11 3.10
root@f2a41ae37ecf:~# /root/.pyenv/bin/pyenv exec python --version
Python 3.11.2
root@f2a41ae37ecf:~# /root/.pyenv/bin/pyenv local
3.11
3.10 The previous behavior of these commands was to modify the user input (resolve version/add postfix) and then save it to the ".python-version". From now we pin the original user input (if it's correct) and resolve it each time we call python shims. Check the updated tests if you can't catch this. |
Usage and behavior is the same as in the original version of pyenv-latest (refers to this)
Prefix auto-resolution to the latest version also turned on for such commands: install, uninstall, global, local
So, from now user can just execute the following commands without having to search for the latest patch (and even minor) version
Closes #407, closes #372
note: issues above are outdated,
pyenv-latest
behavior has been changed and my PR fully (i hope so) supports it