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

Python needs to be ported to Python 3 #369

Open
SWalkerTTU opened this issue Dec 17, 2019 · 4 comments
Open

Python needs to be ported to Python 3 #369

SWalkerTTU opened this issue Dec 17, 2019 · 4 comments
Labels

Comments

@SWalkerTTU
Copy link

As is, the Python module does not work in Python 3.7, and Python 2 will be officially deprecated in two weeks (1st January 2020). I have tried a number of things to get it to work, but to no avail.

@zongweil
Copy link
Contributor

Hey @SWalkerTTU, our Python library already runs properly on Python 3.6 (tested continuously).

Do you have more details on what isn't working in Python 3.7? Could it be a configuration issue?

@SWalkerTTU
Copy link
Author

I've narrowed it down a bit more. The code in the Git repository passes its test on 3.8, but importing the pip package in 3.8 isn't working; the methods don't show up with openlocationcode.dict on 3.8, but do on 2.7.

@socketbox
Copy link

@zongweil I was unable to resolve functions defined in openlocationcode after installing via pip and importing it in the standard way using import openlocationcode or from openlocationcode import *. Instead, I had to either...

  • use from openlocationcode.openlocationcode import * which seems less-than-idiomatic, or...
  • edit the __init__.py file of the package and change from openlocationcode import * to __all__ = ["openlocationcode"] and then import in the standard fashion: from openlocationcode import *

This is with 3.8.1. I haven't checked other versions.

@fulldecent
Copy link
Contributor

Recommended tag: implementation

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

No branches or pull requests

4 participants