Skip to content

pyenv-latest: fast path for when there is an exact match#3437

Merged
native-api merged 1 commit intopyenv:masterfrom
native-api:latest_fast_path
Apr 23, 2026
Merged

pyenv-latest: fast path for when there is an exact match#3437
native-api merged 1 commit intopyenv:masterfrom
native-api:latest_fast_path

Conversation

@native-api
Copy link
Copy Markdown
Member

@native-api native-api commented Apr 23, 2026

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

Avoids O(N^2) complexity when pyenv-latest is called in a loop for existing entries

Tests

  • My PR adds the following unit tests (if any)
    N/A

Avoids O(N^2) complexity when pyenv-latest is called in a loop
for existing entries
@native-api native-api requested review from a team as code owners April 23, 2026 21:22
@native-api native-api merged commit 6481d14 into pyenv:master Apr 23, 2026
21 checks passed
@native-api native-api deleted the latest_fast_path branch April 23, 2026 21:34
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.

1 participant