Skip to content

Conversation

@native-api
Copy link
Member

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

Linux Landlock makes access produce false information, most likely a bug/limitation.
So the fact that shims directory is not writable is not caught by the existing test.
Implemented an additional test in a way with virtually no impact on normal use cases.

Tests

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

@native-api native-api requested review from a team as code owners December 5, 2025 07:43
@native-api native-api merged commit 6f0e2d3 into pyenv:master Dec 5, 2025
19 checks passed
@native-api native-api deleted the landlock_workaround branch December 5, 2025 13:19
@native-api native-api changed the title rehash: Workaround hang for 60 seconds when shims directory is not writable due to Linux Landlock rehash: Fix hanging for 60 seconds when shims directory is not writable due to Linux Landlock Dec 5, 2025
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.

pyenv rehash hangs for 60 seconds in sandboxed environments (Landlock/seccomp)

1 participant