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

PyCCC: single-source Python 2/3 support #83

Closed
avirshup opened this issue Aug 17, 2016 · 3 comments
Closed

PyCCC: single-source Python 2/3 support #83

avirshup opened this issue Aug 17, 2016 · 3 comments
Assignees
Milestone

Comments

@avirshup
Copy link
Contributor

avirshup commented Aug 17, 2016

Story: PyCCC supports python 2 and 3 with a single source branch.

We'll also be porting nbmolviz and moldesign, so we need to document:

  • migration process (starting with Modernize and six.py
  • dev environment setup for simultaneous 2/3
  • testing simultaneous 2/3
  • code compatibility guidelines
@avirshup avirshup added this to the 0.8 milestone Aug 17, 2016
@avirshup avirshup changed the title Py: single-source Python 2/3 support PyCCC: single-source Python 2/3 support Aug 17, 2016
@avirshup
Copy link
Contributor Author

avirshup commented Aug 22, 2016

WIP: Decided to use the future package. Current work is in py3_future branch. Current working assumption is that we can write mostly-clean python 3 code if we include this at the top of each file:

from __future__ import print_function, unicode_literals, absolute_import, division
from future import standard_library
standard_library.install_aliases()
from future.builtins import *

String handling, however, will require much more care than with pure python 2. This branch includes a substantial file handling refactor to address py3's new str and bytes types. The various job running APIs (subprocess, CCC, docker) will also need more explicit codecs.

@avirshup
Copy link
Contributor Author

avirshup commented Aug 24, 2016

Current status: can now explicitly request an interpreter when starting a python job. Tests are running successfully in both languages, including calls from python 2 to 3 and vice versa.

Still to migrate / test:

  • CCC interface
  • Job status widet

@avirshup avirshup self-assigned this Aug 24, 2016
@avirshup
Copy link
Contributor Author

Closing - unlikely to happen on our end in the near future.

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

1 participant