-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Switch .py shebang to python3 #28963
Conversation
My guess is that the Python MacOS failure (https://source.cloud.google.com/results/invocations/0349f858-b297-4b22-b1f8-c23ef6cf2cf8/log) is the same as in #28125 (comment). @gnossen is there any progress with debugging that problem? |
Quick update. I was able to reproduce this locally and will continue debugging it today. |
Thanks for the update. Please note that this is now blocking #28966 |
It turns out my local error was not a reproduction. And it looks like I'm unable to SSH to the Mac workers, so I've been forced to repeatedly commit, push, and wait. I don't have a complete fix yet, but I do know a lot more. It looks like this is related to an implementation detail of CPython on Mac OS. The I was able to get the build step to pass by unsetting this env var in the build step. But then all of the gRPC Python tests that spin up subprocesses started failing, saying that they couldn't find the |
@gnossen those are good findings! very helpful. Also, strangely enough, our "prepare prerequisites" script on macos installs python 3.7.0, 3.8.0, 3.9.0 and s.o. (thus not including patches for each of the versions, which seems to be a mistake).
It seems that a straightforward fix might be to install the latest available patch version for all the pythons. |
8ecadca
to
21f84b5
Compare
Looks like the prepare_build_macos_rc change I added to this PR is fixing the problem with FTR kokoro mac workers come with python3.8.2 pre-installed (which is the version just before the fix for https://bugs.python.org/issue22490 was introduced). |
6ad85cd
to
35efba1
Compare
the fix from this PR should also unblock #28125 |
As the fix in this PR seems to be working correctly, I'm going to merge (I'm happy to address additional comments as a followup). Known failures:
|
CC @lidizheng |
After grpc#28963, the top Python scripts run with the "python3" entry-point found on the PATH. It makes sense to use the same for subprocesses, for two reasons: - There might be no "python" in the PATH, as in my Mac with brew - Having a different Python for subprocesses, especially if it's a Python 2, is asking for trouble.
After grpc#28963, the Python entry points run with the "python3" entry-point found on the PATH. It makes sense to use the same for subprocesses, for two reasons: - There might be no "python" in the PATH, as in my Mac with brew - Having a different Python for subprocesses, especially if it's a Python 2, is asking for trouble.
After grpc#28963, the Python entry points run with "python3" found on the PATH. It makes sense to use the same for subprocesses, for two reasons: - There might be no "python" in the PATH, as in my Mac with brew - Having a different Python for subprocesses, especially if it's a Python 2, is asking for trouble.
After grpc#28963, the Python entry points run with "python3" found on the PATH. It makes sense to use the same for subprocesses, for two reasons: - There might be no "python" in the PATH, as in my Mac with brew - Having a different Python for subprocesses, especially if it's a Python 2, is asking for trouble.
After #28963, the Python entry points run with "python3" found on the PATH. It makes sense to use the same for subprocesses, for two reasons: - There might be no "python" in the PATH, as in my Mac with brew - Having a different Python for subprocesses, especially if it's a Python 2, is asking for trouble. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes #34940 COPYBARA_INTEGRATE_REVIEW=#34940 from lepistone:same-python db4702a FUTURE_COPYBARA_INTEGRATE_REVIEW=#34940 from lepistone:same-python db4702a PiperOrigin-RevId: 584885685
Followup for python3 migration.