-
Notifications
You must be signed in to change notification settings - Fork 144
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
Update for Python 3k compatibility #39
Conversation
Previously this was using the httplib.HTTP class, which was a compatibility layer for python 1.5.2(!). Tidied up to use the newer httplib API for py2.x and http.client in py3k.
Any chance you could take a look at this and release a new version? I need this before I can submit a PR to update tornadorpc for py3k compatibility. |
For py3k compatibility
For py3k compatibility.
It turns out that my original PR wasn't passing tests. My bad. I did a little more work trying to get it over the line but then it occurred to me that I might be flogging a dead horse. Here's why:
What's really required is an entirely new, py3k-only package called The most up-to-date JSON-RPC package is currently json-rpc and it does support py3k, though it does not attempt to mirror the py3k My original goal was a JSON-RPC implementation of Tornado's |
James -- Thanks for the work on it, I apologize I was out all week at a conference. On Thu, Sep 17, 2015 at 12:15 AM, James Stewart notifications@github.com
|
@amorphic It would be nice to have that symmetry between jsonrpc and xmlrpc in python 3. I have a few ideas that might help achieve this.
Just some thoughts... |
This PR updates the jsonrpclib package for Python 3.x (py3k) compatibility.
Most of the commits are syntax updates. Some libraries must also be imported differently depending on whether the Python version is 2.x or 3.x.
The
UnixTransport
was usinghttplib.HTTP
- a very outdated means of establishing a HTTP connection which was deprecated in 2.x, (but still included for 1.5.2 compatibility) and completely removed in 3.x. This transport has thus been updated to funciton in a similar way to the latestxmlrpc.client
code. It should work, but I have no simple means of testing it.