Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add runtime check for valid Python interpreter #7365
Now that we'll soon allow running Pants with more than Python 2.7 for every day users, we should eagerly ensure that they are using a supported Python version. This is necessary because Pants is typically ran as a script, rather than as a library, and the script may be ran with whichever interpreter the user chooses.
Even though the setup repo is supposed to ensure people use a valid interpreter, it is easy to get around this with
While Pants might work with something like 3.5, we should at least warn users they're treading into dangerous waters. If they want to proceed by setting an env var bypass, all power to them. But for the sake of UX we should at least give the warning, rather than relying on strange bugs and
Add a runtime check to
Add unit tests for this all.
When running with anything other than 2.7 or 3.6+, Pants will error out.
Once we drop Py2, we can change this check to 3.6+.