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

Fido 3.0.0 - EventualResult instead of concurrent futures - Fix requests unicode bug #218

Merged
merged 3 commits into from
May 2, 2016

Conversation

lucagiovagnoli
Copy link
Contributor

@lucagiovagnoli lucagiovagnoli commented Apr 28, 2016

Upgrade bravado to use fido 3.0.0
This change makes bravado capable of handling EventualResult objects which are now returned by Fido instead of a concurrent.futures.
I acted on our FutureAdaptor layer of abstraction by creating FidoFutureAdapter and making it and RequestFutureAdapter 'implement' FutureAdapter.

Requests bug
I also introduced a minor little workaround caused by a bug in 'requests' version < 2.8.1 which is documented in their changelog at https://pypi.python.org/pypi/requests

Tests
Testing might be broken on github until fido gets updated to 3.0.0 in https://pypi.python.org/simple/fido/
I manually tested with fido 3.0.0 and our internal acceptance suite though and it was all green.

performing the request, whether it is synchronous or actually asynchornous.

This adapter must be implemented by all bravado clients such as FidoClient
or RequestsClient to wrap the object returned by their 'request' method.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see request clients using it though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's just the interface,
RequestsClient is using it here

class RequestsFutureAdapter(FutureAdapter):

and FidoClient is using it here

class FidoFutureAdapter(FutureAdapter):

:)

@coveralls
Copy link

coveralls commented Apr 29, 2016

Coverage Status

Coverage increased (+0.07%) to 97.172% when pulling f831105 on lucagiovagnoli:fido-3.0.0 into b8ea65d on Yelp:master.

@lucagiovagnoli
Copy link
Contributor Author

I just uploaded fido==3.0.0 to https://pypi.python.org/pypi/fido
tests all green

@askedrelic
Copy link

lg2m

@coveralls
Copy link

coveralls commented Apr 29, 2016

Coverage Status

Coverage increased (+0.07%) to 97.172% when pulling 8ad9d66 on lucagiovagnoli:fido-3.0.0 into b8ea65d on Yelp:master.

@@ -137,7 +138,8 @@ def request(self, request_params, operation=None, response_callbacks=None,
requests_future = RequestsFutureAdapter(
self.session,
self.authenticated_request(sanitized_params),
misc_options)
misc_options
Copy link
Contributor

@laucia laucia Apr 29, 2016

Choose a reason for hiding this comment

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

trailing commas ? Or keep the style, that's what you do in tests as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

keeping the style - amended

@laucia
Copy link
Contributor

laucia commented Apr 29, 2016

lg2m, just a formating nitpick

@coveralls
Copy link

coveralls commented Apr 29, 2016

Coverage Status

Coverage increased (+0.07%) to 97.172% when pulling 3fd8768 on lucagiovagnoli:fido-3.0.0 into b8ea65d on Yelp:master.

@lucagiovagnoli lucagiovagnoli merged commit 550d25a into Yelp:master May 2, 2016
@lucagiovagnoli lucagiovagnoli deleted the fido-3.0.0 branch May 2, 2016 20:44
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.

4 participants