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

Add compatibility for Python3 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevefox
Copy link
Contributor

No description provided.

@giunatale
Copy link
Contributor

Hi there.

Unfortunately I don't think this PR add support for Python3. There are other things to fix in the code to make it work for Python3. I started from stevefox:python3-compat branch and worked out what was missing by testing. You can inspect my branch python3 and in particular commits 0cb58cd, a39b662,6c82c46 and 4e91b46 to see what's missing. It mainly boils down to:

  • handling the difference between items() and iteritems() for dict (the former does not exist in py3 and items() becomes the equivalent)
  • importing configparser correctly so that jarvice_cli can work both on py3 and py2
  • exceptions handling (e.message is not present in py3 exceptions)

I cannot guarantee my code still works on py2 though, you need to test it yourself. In particular, printing exceptions messages is what you should make sure still works in py2. The rest should work as is.

Giuseppe

@johnathanhegge
Copy link
Contributor

Old PR, will come back to this after some other modernization that was due for py2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants