tcalmant / jsonrpclib

A Python (2 & 3) JSON-RPC over HTTP that mirrors the syntax of xmlrpclib (aka jsonrpclib-pelix)
https://jsonrpclib-pelix.readthedocs.io/
Apache License 2.0
53 stars 24 forks source link

SimpleJSONRPCServer: Handle incomplete xmlrpc.server package #30

Closed mschmitzer closed 7 years ago

mschmitzer commented 7 years ago

The "future" package under python2.7 provides the contents of xmlrpclib as the xmlrpc.server module. This lacks the SimpleXMLRPCDispatcher and SimpleXMLRPCRequestHandler classes expected by this module. Try to pick the needed names from the module within the try block and fall back to the python2 code if they are missing.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.09%) to 83.993% when pulling b7f2293022e3e198d6fb5c4c937ef560246ed87a on solute:fix-py27-future into 96cdaa99917342f00477c98e98da86694db770c9 on tcalmant:master.

mschmitzer commented 7 years ago

Hi! I can understand if you don't want to merge this because it's so silly. We do need it because you don't know which of your dependencies is going to pull in future without notice, so I thought I'd try to push it upstream.

tcalmant commented 7 years ago

Hi, I've already had problems with some third-party libraries activating some special behaviours, and it's totally acceptable to handle this special case.

I'll release a new version with this patch later, maybe tonight (UTC+2).

Thanks for your contribution.

mschmitzer commented 7 years ago

Thanks for picking this up!

I've also created an issue with future, since this is really their fault.

tcalmant commented 7 years ago

Version 0.3.0 released for this patch 👍