pylti / lti

Learning Tools Interoperability for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3 Compatibility

ryanhiebert opened this issue · comments

This should be python 3 compatible.

What's in the way of making this python 3 compatible? is it the dependencies being in python2 with no python3 versions?

I have started a work-in-progress Python 3 branch, and the first things that I had to deal with was moved std library imports causing breakage. I expect that there will be some breakage due to the bytes/str stuff, especially in the tool config module, but I haven't been able to get through that yet.

You're welcome to work on it, but I'd ask that you let me know you're working on it, so I'm not accidentally duplicating effort. At this moment, I'm not sure exactly when I'll be working on it again.

I've been in need of a python3 lti library for a while I have not found an existing solution. I'll check it out, if I can figure that problem out, i'll let you know so you don't waste your time.

Thanks. For what it's worth, I think that updating this library to be python 3 compatible is likely the best approach.

What's the status on the python 3 compatibility? I have a project that I'm currently working on that needs this. What can I do to help?

The best way to help is to checkout the py3 branch of this repository, and create a pull request against that branch with some improvements toward making things Python 3 compatible. It doesn't need to complete the compatibility, just be clear in what it's doing so that it's easy to see that it's a compatibility improvement that doesn't cause additional problems.

I put in a little time on the Python 3 compatibility this evening, and I got the test suite at least loading on Python 3. I've gone ahead and merged those changes into master, since there are no test regressions due to those changes.

At this point, I'm hoping that I can just keep incremental changes for Python 3 in master. So if you do some incremental fix for Python 3 compatibility, just open a pull request against master.

To run the tests for Python 3, I run:

tox -e py35

At this point, effort will have to be put in to go over every API in the project, and make sure that the bytes / text boundaries are clearly defined. I can't make a guess as to how difficult that will be to accomplish at this point, but any efforts that anyone makes in that direction would be greatly appreciated.

When I run
tox -e py35
I constantly get:
ImportError: No module named 'lxml' ImportError: No module named 'oauthlib'
even though I have them both installed properly. Any idea why this would be happening?

Not off the top of my head, that really should work. If I were you, I'd try deleting the .tox directory, and see if that gets tox to re-install the dependencies. If you want more assistance, try direct messaging me with gitter, so I can give you more timely feedback.

Also, with tox you don't need to install any dependencies before running tests. tox creates a virtualenv and manages all that for you (or at least it should).