Closed surank closed 8 years ago
Have you tried running 2to3 on the eventregistry directory? https://docs.python.org/3/library/2to3.html I'm not using python 3 but I would expect that it could fix all the compatibility issues, since they are most likely just the print commands that are in v3 used differently. Alternatively, you can just try commenting out the print statement in the line 62 in EventRegistry.py.
hi just did that all good now.
@gregorleban It would be great if you could support python 3 directly or at least specify in the docs that the code is Python 2 only. I think there is a line in setup.py to specify the version (https://docs.python.org/3/howto/pyporting.html#make-sure-you-specify-the-proper-version-support-in-your-setup-py-file). I shouldn't be able to pip install Python 2 code into a Python 3 environment. If the issues are just print statements you can easily update your code using futurize: http://python-future.org/automatic_conversion.html.
I agree that python 3 support would be welcome. I had no time to look into that. If you have some spare time I'd be happy if you'd make some code changes that I could pull in.
On Thu, Jul 7, 2016 at 8:48 PM, Avi Shapiro notifications@github.com wrote:
@gregorleban https://github.com/gregorleban It would be great if you could support python 3 directly or at least specify in the docs that the code is Python 2 only. I think there is a line in setup.py to specify the version. I shouldn't be able to pip install Python 2 code into a Python 3 environment. If the issues are just print statements you can easily update your code using futurize: http://python-future.org/automatic_conversion.html.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gregorleban/EventRegistry/issues/6#issuecomment-231171719, or mute the thread https://github.com/notifications/unsubscribe/AAxauhxuJN8aTSYz5GERIq7LFD-FkRvkks5qTUoVgaJpZM4InkbY .
Gregor
I ran 2to3
on the eventregistry directory (with the -w
option) as you suggested and it appeared to work. Most of the changes had to do with dependency imports. However, running an example I ran into issue #7, JSON serialization errors. Strangely, I ran into the same error yesterday coding a Django app with Python 3. I think it may have to do with the requests
package (according to the traceback) which is also used by Django. For reference I'm using requests 2.10.0 (the latest).
Avi, is the generated content compatible also with python 2 or only 3? How are packages with support for different python version typically distributed? Using separate python packages or is there another way? Regarding the JSON serialization it definitely cannot be a problem of the backend - it has to be related to requests package.
On Thu, Jul 7, 2016 at 9:38 PM, Avi Shapiro notifications@github.com wrote:
I ran 2to3 on the eventregistry directory (with the -w option) as you suggested and it appeared to work. Most of the changes had to do with dependency imports. However, running an example I ran into issue #7 https://github.com/gregorleban/EventRegistry/issues/7, JSON serialization errors. Strangely, I ran into the same error yesterday coding a Django app with Python 3. I think it may have to do with the requests package (according to the traceback) which is also used by Django. For reference I'm using requests 2.10.0 (the latest).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gregorleban/EventRegistry/issues/6#issuecomment-231184830, or mute the thread https://github.com/notifications/unsubscribe/AAxaun5Qa0OHgtFCzdDIARy0bCmNSODDks5qTVXMgaJpZM4InkbY .
Gregor
I tried running the 2to3 and pt2to3 as well as manually fixing all the print statements, however I'm still getting errors with urllib2
, and maxint
.... two features of Python2 that are not present in Python3. Any fixes?
Thanks!
Currently we haven't worked yet on porting the library to python 3. It would be a good update, but we are currently focusing the resources on other tasks that have higher priority (scaling the system, optimizing query processing, etc.). In case you have some fixes I'll be happy to pull them in (in case they don't break the python 2.x). Best, Gregor
On Fri, Sep 16, 2016 at 7:44 PM, RafaRafa notifications@github.com wrote:
I tried running the 2to3 and pt2to3 as well as manually fixing all the print statements, however I'm still getting errors with urllib2, and maxint.... two features of Python2 that are not present in Python3. Any fixes?
Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gregorleban/EventRegistry/issues/6#issuecomment-247662800, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxauujbVQczMzVV67LzWgwMazdMzcxdks5qqtVzgaJpZM4InkbY .
Gregor
does it support python 3.5 i managed to succesfully install via pip.
however code fails
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/eventregistry/init.py", line 2, in
from .EventRegistry import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/eventregistry/EventRegistry.py", line 62
print "Event Registry host: %s" % (self._host)
i tested the above using interactive python. from eventregistry import *