Skip to content
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

Don't mutate clients #69

Merged
merged 1 commit into from
Dec 8, 2014
Merged

Don't mutate clients #69

merged 1 commit into from
Dec 8, 2014

Conversation

bpicolo
Copy link
Contributor

@bpicolo bpicolo commented Dec 5, 2014

Fixes #68 (as well as a number of other related bugs).

Requests will no longer mutate clients.

I created an integration test that actually launches a server in a separate thread... I think it might be the best way to handle it but it will of course fail if it isn't allowed to bind a port or hits a race condition binding one.

@@ -50,34 +52,38 @@ def setup(self, request_params):
}

crochet.setup()
self.eventual = self.fetch_deferred()
return self.fetch_deferred(request_params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this function deserves a different name name. It feels less like a setup() and more like a start_request() (or something like that).

@dnephin
Copy link
Contributor

dnephin commented Dec 6, 2014

LGTM, my comments are really just about further cleanup to the interface, but I think this definitely fixes the bug. Up to you how you feel about my suggested interface changes.

@bpicolo
Copy link
Contributor Author

bpicolo commented Dec 8, 2014

Renamed to start_request. Made an issue for the cancel changes

bpicolo pushed a commit that referenced this pull request Dec 8, 2014
@bpicolo bpicolo merged commit d4f4402 into Yelp:master Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling result() on a list of futures
2 participants