-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python-3.12 compat and refactor of path determination. #845
Python-3.12 compat and refactor of path determination. #845
Conversation
In `stdlib._call()`, we lookup whether the command to call is present on the user's PATH. Two changes are made to this functionality: * Simplify the lookup of PATH now that we have a local variable with all the information we need. * Add compat code to use `shutil.which()` on Python3 (while still using `distutils.spawn.find_executable()` on Python2). As noted in pstodulk's comment, `which()` will be needed when the code runs on Python-3.12.
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
To launch regression testing public members of oamg organization can leave the following comment:
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes completely sense. no idea why it didn't come to my mind originally. thanks :) just one liner change is needed
In
stdlib._call()
, we lookup whether the command that we are going to call is present on the user's PATH. Two changes are made to the function:shutil.which()
on Python3 (while still usingdistutils.spawn.find_executable()
on Python2). As noted in the comment,which()
will be needed when the code runs on Python-3.12.