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
54 stars 24 forks source link

Remove support of Python 2.6 #22

Open tcalmant opened 9 years ago

tcalmant commented 9 years ago

Support for Python 2.6 forces to use ugly tricks to ensure compatibility with this version. It also causes a lot of trouble to correct bugs, as each correction must then be rewritten to work with Python 2.6.

Therefore, jsonrpclib 0.2.5 is the last to support Python 2.6, the next release will get rid of it.

byaka commented 9 years ago

It's sad..

tcalmant commented 9 years ago

I'm also thinking about having my own implementation of what xmlrpclib does, instead of inheriting its classes. This would allow to keep the support Python 2.6, as we wouldn't depend on xmlrpclib internal API anymore, but it would require some work which I can't provide for the moment...

2015-04-10 17:56 GMT+02:00 BYaka notifications@github.com:

It's sadly..

— Reply to this email directly or view it on GitHub https://github.com/tcalmant/jsonrpclib/issues/22#issuecomment-91599947.

byaka commented 9 years ago

I'm understand.. Today i'm started writing my own implementation of jsonrpcServer lib. I'm try to use gevent for handling connections. I'm hope this solve my problem with Ghosts on high load.

When i'm end, i'm write report about this experiment.

And as one of my use-cases is web browsers, i'm want to implement auto-fallback to JSONP for old browsers.

tcalmant commented 9 years ago

Well, if you reuse the JSON-RPC handling code from jsonrpclib (i.e. parsing & method calls), this could be a great contribution. The library could then have 3 ways to handle requests: using xmlrpclib classes, using a "custom" transport layer based on Python 3 xmlrpc package and yours based on gevent :)

2015-04-10 18:34 GMT+02:00 BYaka notifications@github.com:

I'm understand.. Today i'm started writing my own implementation of jsonrpcServer lib. I'm try to use gevent for handling connections. I'm hope this solve my problem with Ghosts on high load.

When i'm end, i'm write report about this experiment.

And as one of my use-cases is web browsers, i'm want to implement auto-fallback to JSONP for old browsers.

— Reply to this email directly or view it on GitHub https://github.com/tcalmant/jsonrpclib/issues/22#issuecomment-91609812.

tcalmant commented 9 years ago

The backport of xmlrpclib from Python 2.7.9 seems to work with Python 2.6.9. It has to be tested in a real environment, not only with unit tests.

This is currently tested in the py26 branch.

byaka commented 9 years ago

I can test this branch on one of my servers with py2.6, if u want.

byaka commented 9 years ago

I'm completed of testing my own implementation of jsonrpcServer lib. If u interesting https://github.com/byaka/flaskJSONRPCServer Unfortunately i not used handling code from jsonrpclib for now. I'm think it not simple, because i add some special things (like fallback to JSONP, dinamically adding headers by dispatcher, auto CORS). I'm use Flask framework for handling connections. Earlier i tested https://github.com/cenobites/flask-jsonrpc but it also has problem with Ghosts. Strange, because my old JSONP api, used simple Flask without another libs has not this problem. But all my tests show no issues on highload with my new lib (tested only with Gevent backend).

tcalmant commented 9 years ago

Thanks for sharing :) If I understand correctly, the Flask-gevent version works well, but the Flask-only has ghost threads ?

byaka commented 9 years ago

I not tested Flask-only version of my lib yet. Only planned on next week. But another lib flask-jsonrpc has ghost threads. But i'm think this problem of lib, not Flask. Because as i say, my another server, working on Flask (not over jsonrpc protocol) work without problems near 3 weeks.