Skip to content

bug(test-client-clis): pass str to shutil.which for Windows support#3211

Open
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/shutil-which-path-windows
Open

bug(test-client-clis): pass str to shutil.which for Windows support#3211
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/shutil-which-path-windows

Conversation

@Kumarutkarsh9470

Copy link
Copy Markdown

EthereumCLI.__init__ and is_installed passed a Path to shutil.which. On Windows under Python 3.11 (a supported version) shutil.which calls .lower() on the argument, so a Path raises AttributeError instead of resolving the binary. Convert the path to str at both call sites and add tests covering a Path binary.

Description

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Baby Elephant

`EthereumCLI.__init__` and `is_installed` passed a `Path` to
`shutil.which`. On Windows under Python 3.11 (a supported version)
`shutil.which` calls `.lower()` on the argument, so a `Path` raises
`AttributeError` instead of resolving the binary. Convert the path to
`str` at both call sites and add tests covering a `Path` binary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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