bpo-34725: Adds _Py_SetProgramFullPath so embedders may override sys.executable#9860
bpo-34725: Adds _Py_SetProgramFullPath so embedders may override sys.executable#9860zooba merged 5 commits intopython:masterfrom
Conversation
|
I have a backport of this for 3.7 that adds the API as a private one, and does not include the |
vstinner
left a comment
There was a problem hiding this comment.
Please don't add yet another Py_SetXXX() to configuration Python before it's initialization. There is an on-going project, the PEP 432 of Nick Coghlan, to add a consistent and unique way to configure Python. Until this PEP is fully implemented, please only add private methods: rename it to _Py_SetProgramFullPath().
Why no calling it directly Py_SetExecutable() and set core_config->executable? Sorry, I only read quickly the bug and the PR.
|
When you're done making the requested changes, leave the comment: |
|
I have made the requested changes; please review again @vstinner I added it the way I did because that's the only way I could make it work without the value being overwritten. If you can see a better way to make it happen, please show me, but when I tried your suggestion it didn't end up as neat as this way. |
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
|
Given the lack of additional feedback, I'll run CI one more time against the latest master and then merge (in a day or so, once I'm done with international travel…). |
I also made
prefixandexec_prefixconsistent between platforms, so there is less optional stuff going on in the configuration.https://bugs.python.org/issue34725