Skip to content
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

ansible_mitogen: Respect interpreter_python and ANSIBLE_PYTHON_INTERPRETER #1206

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

moreati
Copy link
Member

@moreati moreati commented Jan 3, 2025

This adapts PR #740 by @extmind (afe0026), which augmented the call to Connection.get_task_var() with C.config.get_config_value('INTERPRETER_PYTHON') as a default. Instead this replaces the call to Connection.get_task_var(). The aim is greater simplicity by disentangling templating of a configured interpreter path and discovery of an interpreter when none is configured. I think this also reduces the number of times Connection._get_task_vars() is called, so reducing the number of times we do the ugly stack frame inspection.

I've also added test cases.
fixes #740, refs #833

@moreati moreati force-pushed the issue1083-python_path2 branch 7 times, most recently from 80f7f75 to bce129f Compare January 3, 2025 12:54
@moreati moreati changed the title WIP 2 ansible_mitogen: Respect interpreter_python and ANSIBLE_PYTHON_INTERPRETER Jan 3, 2025
@moreati moreati mentioned this pull request Jan 3, 2025
…RETER

This adapts PR mitogen-hq#740 by @extmind (afe0026),
which augmented the call to `Connection.get_task_var()` with
`C.config.get_config_value('INTERPRETER_PYTHON'` as a default. Instead this
*replaces* the call to `Connection.get_task_var()`. The aim is greater
simplicity by disentangling templating of a configured interpreter path and
discovery of an interpreter when none is configured. I think this also reduces
the number of times `Connection._get_task_vars()` is called, so reducing the
number of times we do the ugly stack frame inspection.

I've also added test cases.

Co-authored-by: Lars Beckers <lars@extmind.de>
@moreati moreati force-pushed the issue1083-python_path2 branch from bce129f to 945e360 Compare January 3, 2025 13:27
@moreati moreati marked this pull request as ready for review January 3, 2025 13:29
@moreati moreati merged commit 11a6ccf into mitogen-hq:master Jan 7, 2025
22 checks passed
@moreati moreati deleted the issue1083-python_path2 branch January 7, 2025 09:10
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.

Ansible+Mitogen ignores interpreter_python global config
1 participant