Skip to content
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

Refactor python2 handling after increasing test coverage #96

Closed
willingc opened this issue Jan 15, 2018 · 4 comments
Closed

Refactor python2 handling after increasing test coverage #96

willingc opened this issue Jan 15, 2018 · 4 comments

Comments

@willingc
Copy link
Member

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.

@willingc
Copy link
Member Author

cc / @MSeal @betatim @rgbkrk

@betatim
Copy link
Member

betatim commented Jan 15, 2018

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

python_2 = sys.version_info[0] == 2
PYTHON = 'python2' if python_2 else 'python3'
execute_notebook = partial(execute_notebook, kernel_name=PYTHON)
should use six.PY2.

@MSeal
Copy link
Member

MSeal commented Jan 15, 2018

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

@MSeal
Copy link
Member

MSeal commented Jul 29, 2019

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.

@MSeal MSeal closed this as completed Jul 29, 2019
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

No branches or pull requests

3 participants