Merge lp://staging/~ceronman/txsolr/response-consumer-errback-843429 into lp://staging/txsolr
Proposed by
Manuel Cerón
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 59 | ||||
Proposed branch: | lp://staging/~ceronman/txsolr/response-consumer-errback-843429 | ||||
Merge into: | lp://staging/txsolr | ||||
Diff against target: |
235 lines (+120/-32) 4 files modified
txsolr/__init__.py (+8/-2) txsolr/client.py (+16/-9) txsolr/response.py (+21/-16) txsolr/test/test_response.py (+75/-5) |
||||
To merge this branch: | bzr merge lp://staging/~ceronman/txsolr/response-consumer-errback-843429 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jamu Kakar (community) | Approve | ||
Esteve Fernandez (community) | Approve | ||
Terry Jones | Pending | ||
Review via email: mp+74325@code.staging.launchpad.net |
Description of the change
This branch introduces the following changes:
- ResponseConsumer now handles correctly errors when decoding a response. The bug was causing memory leaks and unfired deferreds.
- client._request now adds an extra errback just in case something bad happens in the response callback.
To post a comment you must log in.
[1]
In client.py, this:
is the same as
Does it really make sense for responseErrback to handle both kinds of
errors? I.e., if an error happens in agent.request, it will be passed to
responseErrback. But if there's an error in responseCallback, any kind of
error at all - including bad Python syntax, name error, attribute error,
etc, then you're also sending that error to responseErrback, which
uncoditionally errbacks with a HTTPRequestError. That's just wrong :-)
---
OK, I just pushed a branch with what I think is a neater way to do all
this. Sorry, I'm very tired.... I'll try to be more communicative
tomorrow.
bzr+ssh: //bazaar. launchpad. net/~terrycojon es/txsolr/ response- consumer- errback- 843429