Skip to content

Conversation

@fblanchetNaN
Copy link
Contributor

@fblanchetNaN fblanchetNaN commented Jul 28, 2023

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)
    • N/A

Description

  • Here are some details about my PR

I added support for PowerShell (on Linux), it could probably be implemented for rbenv also, however I never used ruby and don't feel confident to implement it.

I know it's maybe a patch too important for the core code, if so just close this (draft) PR.

Tests

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

I don't know how BATS works, I need help / hints to understand what should I do -- where is the tested shell specified?

@native-api
Copy link
Member

I don't know how BATS works, I need help / hints to understand what should I do -- where is the tested shell specified?

Tests can be run with make test. It shows the commands it runs so you can run them by hand or run bats with other arguments when diagnosing tests (you'll probably need -f) etc.

Look at the existing tests for the files you've changed to get an idea of what they do. They're basically Bash scripts with some extra syntax that denotes tests and setup/teardown code that's preprocessed and then executed by Bats.

We're using a rather old Bats version, 1.2.0, the docs are at https://github.com/bats-core/bats-core/blob/v1.2.0/README.md . Apart from functions defined by Bats, we use additional ones defined in test_helper.bash and test files themselves.

Most tests are unit tests that mock any external interactions; IIRC in the affected files, there're only 1-2 integration tests for Fish.

@native-api
Copy link
Member

I know it's maybe a patch too important for the core code, if so just close this (draft) PR.

@pyenv/pyenv-core-maintainers IMO supporting PowerShell is fine. However, due to unfamiliarity with it, we may need to request help if more stuff interacting with it will be needed in the future or problems are reported.

@native-api native-api closed this Dec 26, 2023
@native-api native-api reopened this Dec 26, 2023
@native-api native-api marked this pull request as ready for review May 20, 2025 19:05
@native-api native-api requested review from a team as code owners May 20, 2025 19:05
Copy link
Member

@native-api native-api left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test failures look like bona fide bugs in the code

@native-api native-api merged commit aeea3ac into pyenv:master Dec 21, 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.

2 participants