Skip to content

Change env python to env python3 #41981

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

porglezomp
Copy link
Contributor

I don't see any of the other PRs doing a full replacement of all the shebangs—this just changes all of them without doing any of the work to make sure that's fine.

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should drop __future__

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is intended as just dropping all the shebangs and not doing any compatibility cleanups, just making it easy to test if anything breaks with Python 3 (since all the __future__ etc. should keep working)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably shouldn't be merged at all

@Robertorosmaninho
Copy link
Contributor

I suggest you erase this line too since there is no need for python 2.7 after these modifications.

In the case of macOS 12.3 that Python2.7 isn't in /usr/bin this line raises the following error:

xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find python2.7 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "python2.7", not a developer tool or in PATH
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find python2.7 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "python2.7", not a developer tool or in PATH

@porglezomp
Copy link
Contributor Author

Going to just run some of the CI jobs on this

@porglezomp
Copy link
Contributor Author

@swift-ci please test

@porglezomp
Copy link
Contributor Author

@swift-ci Please Python lint

@porglezomp
Copy link
Contributor Author

@swift-ci Please smoke benchmark

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.

3 participants