Skip to content

Conversation

@vebjorre
Copy link

@vebjorre vebjorre commented Oct 15, 2025

Finishing the work of @akx in #2144, removing any use of distutils in order to support python>=3.12.

Fixes #2091

@sonarqubecloud
Copy link

@vebjorre vebjorre changed the title don't use distutils in env_helper.py remove distutils in order to support python 3.12 Oct 15, 2025
def strtobool(val: str) -> bool:
return val.lower() in ("yes", "y", "true", "t", "1")


Choose a reason for hiding this comment

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

Hello @vebjorre , thanks very much for this contribution! We'd like to request two small edits after which we'd be happy to merge and release this.

  1. It looks like "on" should be in the tuple
  2. The original strtobool implementation throws a ValueError if you pass in an invalid value, we'd like to keep that behavior

If you could make those edits then we'll move this forward, thanks again!

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.

distutils is deprecated. distutils.util.strtobool needs replacement.

3 participants