IPA's Python scripts use the shebang #!/usr/bin/python3 -E. The option -E makes Python ignore all env vars starting with PYTHON. Since Python 3.4, the Python interpreter has an additional argument to isolate scripts from the user environment. The -I option includes -E (ignore envs), -s (ignore user site packages), and does not add current script dir to sys.path. Since master/4.8 supports only Python >= 3.6, we should use -I everywhere.
#!/usr/bin/python3 -E
-E
PYTHON
-I
-s
sys.path
https://docs.python.org/3/using/cmdline.html#cmdoption-e https://docs.python.org/3/using/cmdline.html#id2
Hello everyone, I took the liberty to work on this issue and made a PR on github
https://github.com/freeipa/freeipa/pull/3416
Hope everything its fine, I am testing the scripts but seems everything is OK until now.
master:
ipa-4-8:
Metadata Update from @rcritten: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.