spacetelescope / pandokia

Regression tests framework.
Other
2 stars 4 forks source link

Make bare minimum Py3-compatibility changes needed for JETC py3 runs #36

Closed cdsontag closed 5 years ago

cdsontag commented 5 years ago

Requesting Oi In's review. Happy to get @cslocum 's / @jhunkeler 's / @vglaidler's as well, but plan to merge even if only Oi In okays it. The current pandokia brokenness is apparently blocking normal Py3 test runs right now (stuff fails during init due to this, so even if the tests do seem to run, stuff is wrong).

This test run log:

shows that the version of pandokia in github if NOT YET FULLY Python3 compliant. This PR fixes those issues.

This PR is INTENTIONALLY not attempting to fix all such issues. I picked the few files involved (and one they all use: common.py) and upgraded them by fixing bad print and StringIO and urllib usages. The resulting code targets both py2 and py3.

We should some day make a larger pass through all the code doing 2 things:

but I am intentionally not doing that right now (less code changed = less to test = less risk).

cdsontag commented 5 years ago

When viewing the diffs, you will all want to click "Hide whitespace changes". The code not only had extra end-of-line spaces in many places, it also had the accursed combination of SPACES and TABS or some horrendous reason. Had to fix that too.

cdsontag commented 5 years ago

@cslocum - I just had a more general conversation with @oiintam about glitch and this work and pandokia and Python 2-versus-3.

It occurs to me that pdk-anything would have failed on glitch if it was using Python3.

So glitch is currently using only-Python2 for it's top-level stuff.

So, I'm guessing we'll need to schedule time to fully convert pandokia because I'm guessing that we will be required to stop relying on Python2 for any of our software by the end of 2019. I'm guessing you already thought of this (and there is probably already a ticket). But heads up just in case.

@vglaidler - please confirm that we will need to stop using Python2 for everything (not just pandeia)