Papermill: Refactor python2 handling after increasing test coverage

Created on 15 Jan 2018  路  4Comments  路  Source: nteract/papermill

There's a bit of inconsistency of how Python2 is being used alongside Python 3. After test coverage is at 80% ish, we should consider refactoring which libraries are used to best support python2 and python3 so that the code base essentially handles both with a minimum of "if 2" or "if 3". Focus on selecting the best practices for migration from 2 to 3.

Most helpful comment

Gonna close this issue, as more likely we'll be removing python 2 support before we do more of this. Also our test coverage is much higher now with the existing code.

All 4 comments

cc / @MSeal @betatim @rgbkrk

I think there is already use of six so we should build on that and switch things which deviate from that to using six.

For example https://github.com/nteract/papermill/blob/3fa2fabce27f64f62bf16e361cff4b94dcd83491/papermill/tests/test_execute.py#L18-L20 should use six.PY2.

Yes agreed to all of that. Between six and future we should be able to get the explicit branching factor down a lot.

Gonna close this issue, as more likely we'll be removing python 2 support before we do more of this. Also our test coverage is much higher now with the existing code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MSeal picture MSeal  路  3Comments

omar-masmoudi picture omar-masmoudi  路  4Comments

otterotter408 picture otterotter408  路  7Comments

vinaykumar80 picture vinaykumar80  路  8Comments

MSeal picture MSeal  路  3Comments