{"action":"created","issue":{"url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/39","labels_url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/39/comments","events_url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/39/events","html_url":"https://github.com/joshmarshall/jsonrpclib/pull/39","id":105930706,"number":39,"title":"Update for Python 3k compatibility","user":{"login":"amorphic","id":1538480,"avatar_url":"https://avatars.githubusercontent.com/u/1538480?v=3","gravatar_id":"","url":"https://api.github.com/users/amorphic","html_url":"https://github.com/amorphic","followers_url":"https://api.github.com/users/amorphic/followers","following_url":"https://api.github.com/users/amorphic/following{/other_user}","gists_url":"https://api.github.com/users/amorphic/gists{/gist_id}","starred_url":"https://api.github.com/users/amorphic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amorphic/subscriptions","organizations_url":"https://api.github.com/users/amorphic/orgs","repos_url":"https://api.github.com/users/amorphic/repos","events_url":"https://api.github.com/users/amorphic/events{/privacy}","received_events_url":"https://api.github.com/users/amorphic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-11T01:56:11Z","updated_at":"2015-09-17T05:15:03Z","closed_at":"2015-09-17T05:15:02Z","pull_request":{"url":"https://api.github.com/repos/joshmarshall/jsonrpclib/pulls/39","html_url":"https://github.com/joshmarshall/jsonrpclib/pull/39","diff_url":"https://github.com/joshmarshall/jsonrpclib/pull/39.diff","patch_url":"https://github.com/joshmarshall/jsonrpclib/pull/39.patch"},"body":"This PR updates the jsonrpclib package for Python 3.x (py3k) compatibility.\r\n\r\nMost 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.\r\n\r\nThe `UnixTransport` was using `httplib.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 latest `xmlrpc.client` code. It _should_ work, but I have no simple means of testing it."},"comment":{"url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/comments/140971881","html_url":"https://github.com/joshmarshall/jsonrpclib/pull/39#issuecomment-140971881","issue_url":"https://api.github.com/repos/joshmarshall/jsonrpclib/issues/39","id":140971881,"user":{"login":"amorphic","id":1538480,"avatar_url":"https://avatars.githubusercontent.com/u/1538480?v=3","gravatar_id":"","url":"https://api.github.com/users/amorphic","html_url":"https://github.com/amorphic","followers_url":"https://api.github.com/users/amorphic/followers","following_url":"https://api.github.com/users/amorphic/following{/other_user}","gists_url":"https://api.github.com/users/amorphic/gists{/gist_id}","starred_url":"https://api.github.com/users/amorphic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amorphic/subscriptions","organizations_url":"https://api.github.com/users/amorphic/orgs","repos_url":"https://api.github.com/users/amorphic/repos","events_url":"https://api.github.com/users/amorphic/events{/privacy}","received_events_url":"https://api.github.com/users/amorphic/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T05:15:02Z","updated_at":"2015-09-17T05:15:02Z","body":"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:\r\n\r\n`jsonrpclib` has been specifically designed to mirror `xmlrpclib` and this works really well in py2.x. But in py3k `xmlrpclib` has been split into `xmlrpc.client` and `xmlrpc.server`, so the paradigm is broken.\r\n\r\nWhat's really required is an entirely new, py3k-only package called `jsonrpc` containing the modules `jsonrpc.client` and `jsonrpc.server`. Unfortunately this name is already taken by an [old package](https://pypi.python.org/pypi/jsonrpc/1.2) which hasn't been updated since 2012 and doesn't seem to by py3k-compatible.\r\n\r\nThe most up-to-date JSON-RPC package is currently [json-rpc](https://pypi.python.org/pypi/json-rpc/) and it does support py3k, though it does not attempt to mirror the py3k `xmlrpc` package.\r\n\r\nMy original goal was a JSON-RPC implementation of Tornado's `WebsocketHandler` so I think I might go down the path of writing one based on `json-rpc`."}}