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

Auto-resolve prefixes to the latest version #2487

Merged
merged 28 commits into from Oct 30, 2022

Conversation

native-api
Copy link
Member

@native-api native-api commented Oct 17, 2022

Make sure you have checked all steps below.

Prerequisite

  • Please consider implementing the feature as a hook script or plugin as a first step.
    • pyenv has some powerful support for plugins and hook scripts. Please refer to Authoring plugins for details and try to implement it as a plugin if possible.
  • Please consider contributing the patch upstream to rbenv, since we have borrowed most of the code from that project.
    • We occasionally import the changes from rbenv. In general, you can expect changes made in rbenv will be imported to pyenv too, eventually.
    • Generally speaking, we prefer not to make changes in the core in order to keep compatibility with rbenv.
  • My PR addresses the following pyenv issue (if any)

Description

  • Here are some details about my PR

When given a prefix rather than full name, Pyenv resolves it to the latest release in the corresponding version line.

CAVEATS:

  • It must be a full prefix -- the actual searched prefix is <prefix>[-.]
  • Other flavors are likely sorted incorrectly atm. Need someone with a use case to clarify the intended semantic.
  • Prereleases and versions with some suffixes (-dev, -src, -latest) are not searched. Again, the intended semantic is unclear.
  • pyenv uninstall has been excluded from the resolution feature: deleting a dynamically selected installation could be problematic. Need user input to be sure that this would be okay.

Tests

  • My PR adds the following unit tests (if any)
    Tests for the new functionality in

@native-api native-api merged commit a12f947 into pyenv:master Oct 30, 2022
@native-api native-api deleted the auto-latest branch October 30, 2022 00:38
@BrandonLWhite
Copy link

Awesome feature. This has been the missing piece in pyenv. Thank you for implementing this!

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

Successfully merging this pull request may close these issues.

None yet

2 participants