-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-46890: Fix setting of sys._base_executable with framework builds on macOS #31958
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
Conversation
…on macOS The side effect of this bug was that venv environments directly used the main interpreter instead of the intermediate stub executable, which can cause problems when a script uses system APIs that require the use of an application bundle.
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.
LGTM. Couple of suggestions that might make it easier for reading/understanding the code, but nothing major.
I would like to review and play with the PR a bit but I likely won't be able to before Monday. If you don't hear anything by then, please go ahead. Thanks! |
* Ensure WITH_NEXT_FRAMEWORK is set unconditionally while running getpath.py * Remove duplicate code in the WITH_NEXT_FRAMEWORK case.
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.
After spending some time reviewing and testing it, I am also not 100% confident that this is the best fix since this area is so complex but it does seem to work as advertised and does fix a serious problem with venvs in a framework environment. Since we are nearing the end of the alpha phase of 3.11, it's probably best to get this in now for more exposure. I pushed a fix for a few non-code typos. Since I have been sitting on this and with 3.11.0a7 going to be tagged very soon, I'll merge it now. Thanks, Ronald, and thanks, Steve, for diving into such murky waters.
The side effect of this bug was that venv environments directly
used the main interpreter instead of the intermediate stub executable,
which can cause problems when a script uses system APIs that
require the use of an application bundle.
https://bugs.python.org/issue46890