Merge query server from kxepal/viewserver
Hi! I read #268 and i really want the python query server!
This PR import the code from kxepal/couchdb-python@9145545. And i modified the code in order to support python3.
The test cases from @kxepal is included.
To be honest, i do not test it with my couch yet. i just want to send this PR as soon as possible. And i do not review whole the code base, i just make the testing pass. So please test and review it carefully. :smile:
I listed some idea needed everyone's feedback or potential problem here:
- Test with pypy
- performance benchmark
- Threading/multiprocessing support
- Security aspect
- prevent dangerous import e.g.
import socket, os
- prevent dangerous import e.g.
- Documentation
Awesome! Thank you!
As for security: forget about it. There is no safe sandboxing for Python, unless PyPy, but it's not proven to be secure AFAIK.
Hi @kxepal ~~Long time age~~ I have tried this https://pypi.python.org/pypi/RestrictedPython
Not sure this package is python3 ready or not, and it seems unmaintained. Maybe we can try it out and fork it.
Hi @iblis17 If you're interested there were quite comprehensive discussion about sanboxing Python on python-dev@ ML. Check "Reviving restricted mode?" and "The pysandbox project is broken" threads there (sorry, I'm not sure how to provide link to them with a nicer readable UI as my mail client). TL;DR - don't waste a time. Worth to check PyPy sandbox project though.
:-o I will check out PyPy sandbox project.
Hey! I think it's great that you want to work on this. However, my concerns from #268 are pretty much still the same. Would you be up for creating a commit series following the plan outlined by @kxepal in that PR to bring us from the current state to your end state in a clean series?
Hi @djc! Ok. I will make it. I need more time to understand the code for creating the commit series.
I will create a new branch to work on and let this branch un-rebased. Everyone can test/file bugs with this branch first.
@kxepal when I need your help, may I discuss here? or do we have irc channel?
@iblis17 Feel free here anytime. Here we have a code as context, so it would be easy to talk about it.
@iblis17 very happy to hear that you want to take this on! Please let us know at any point if you need help.
@kxepal Do you mind if i commit with author=kxepal like this?
@iblis17 I'm fine with either, just forget about the work you'd done (;
@iblis17 how are you doing? Do you think you'll be able to finish this?
@djc I'm sorry for my procrastination.
busy until next week... I hope that i can finish it in two weeks.
I think the progress is about 40% now....
Woo, cool! Maybe you can just start a new pull request with what you've got so far. Assuming it doesn't break any of the test cases we currently have, we can start to merge it already.