-
Notifications
You must be signed in to change notification settings - Fork 83
Basic update handler support. #268
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
Conversation
Note: I'm not sure why I had to patch infinit@acbfded , but in my setup (Python 3.4.1, CouchDB 1.6.1) the output stream of the query server is text, not binary. Could be the way CouchDB starts the subprocess ? Some subtle Python difference in the way it determines whether stdin is text ? Anyway it fixes it for me and hopefully doesn't break it for other, but some double check would be a good idea. |
That's completely incorrect implementation. See JavaScript query server, his tests or my fork where it's done. |
I don't think "completely incorrect" is an even remotely appropriated comment. As I stated, it's partial and I'm building it as I go just to fill-in the missing feature. Now, if you have a working version - which I didn't know - I'd be more than glad to just see it merged here and use it. If there is a fundamental flaw in the way I started implementing this, a few line stating why would be helpful. I certainly don't expect it to pass the test suite you mentionned since I implemented a small subset of the |
@mefyl it's "incorrect" because:
"Completely" is because it's incompatible with the way how javascript ones works and breaks common ddoc structure what will prevent you simply backport any JS couchapp to Python. Sorry for not describing "why" in my reply. |
Well, I stopped work on it long time ago because it's done, but it unlikely be merged because of commit history policy. So it's just there for history and for others who want to implement it again (: |
Thanks for the precisions !
About the "incompatible with javascript" part, are we talking about the erroneous Understand my process here is to implement the features on the go as I can't sit down one week with specs to implement this, so it will be incremental and inferior to a full implementation for some time. Your code will certainly be of help, thanks for pointing me to it. |
As reported by Alexander Shorin.
@kxepal I'm sorry about the commit policy. Can I somehow entice you to do a little work to get the whole thing merged again? I started on it myself once or twice, but it's quite a bit of work and I currently lack the motivation/time to clean things up. However, given that you already know how things ought to work, it seems like a somewhat clean history isn't that much work. Otherwise, maybe we should contemplate just squashing the whole thing and making sure the end state makes sense. Let's iterate on it together? |
@djc No need to sorry: it's good that you have and require commits to met high, good, standards. I respect this and eventually try to follow the same rules. The main problem is that it's very boring to reorganize 50+ commits of iterative work and hard to keep all things consistent after conflicts. Today when I look on those code again, I wish I would at least clean it and fix the style: 4 years is quite a lot of time to change the views on Python coding. I see two ways to handle it:
P.S. Sorry for my initial attitude here, it seems I wasn't in good mood to be polite. |
@kxepal can we just go straight to implementing the stateless design? With the policy I have in mind, the goal is not to reflect exactly the history of development. The goal is only to have commits that are understandable as a unit, that work towards the goal of the series, and ideally are easily reviewable (which implies some upper bound on size, ideally). I may not have expressed this clearly before. So what I don't like is having the extra bug-fixing commits in the history; those should be squashed into the commit that introduced the bug. Would this make it easier? Thanks for the apology, accepted. Everyone can have a bad day! |
@djc you know....I walk over the history, read the code and found that the only way to make it work and don't feel the shame about, is to cut the latest code version into consistent commits. I have the following plan in my head now:
I just imported viewserver branch to GitHub to make it easy estimate all the tragedy (: |
No offense taken either; if your implementation is being merged, I'll stand by waiting for it. As I stated, there is still infinit@acbfded that is require for the server to work at all in my setup, so maybe just this patch should be considered ? (also the short sha1 is a permutation of abcdef, that should make it worth keeping) |
@kxepal that sounds awesome!! I'd love to get that merged. @mefyl sorry to side-track your pull request, and sorry if your work doesn't end up being used in the project. Still, your pull request has been instrumental in landing a better view server, so I hope you're getting a good deal in the end. I bet @kxepal will look at your pull request if he has problems getting his work to pass with Python 3. |
I have no pride in seeing MY code merged, if I too get a fully featured view server at no development cost, it's even better :) |
This will be done as part of #286, closing. |
Same player play again, passing Travis build, with a unit test and some doc.
Implementation for some of the
ddoc
query server call, enabling to write update handlers in python. I'm very new to CouchDB so this might be incomplete, but it works for me so far. I might keep adding support as my needs evolve.