Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Python 3 issues - os.environ bytes vs unicode #6222
In Py3, it expects unicode and will crash upon receiving bytes.
We didn't catch this because there is no backport for the
If Py2, keep existing conversion from unicode to bytes. If Py3, don't modify the passed in unicode.
CI is only going to prove this doesn't break Py2. It has no guarantees Py3 will work.. I got the unit tests to work, but there may still be other issues I don't know how to detect because we can't yet run CI in Py3 (too many other issues that have to be resolved)
left a comment
One facility that it would be great to look into with regard to getting the first support for Python3 integration tests in place would be to do a mashup of https://github.com/pantsbuild/pants/blob/master/tests/python/pants_test/pants_run_integration_test.py#L115-L121 and https://github.com/pantsbuild/pants/blob/master/tests/python/pants_test/pants_run_integration_test.py#L62-L69 that could be used like:
Getting that working would involve a bit more fiddling in that file to ensure that
left a comment
Thanks for the suggestion on Py3 integration test compatibility! I'll look into it as a separate issue.
We would likely still run into the issue of Py3 tests failing for reasons unrelated to changes to the file, though, unfortunately. Until every test is green with Py3, it will be ambiguous what is causing failures.
For now, we'll have to make do with CI only checking for Py2 regressions.