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

Deleting logic for handling form data in favor of python 'requests' for the Asynchronous client #196

Merged
merged 5 commits into from
Mar 8, 2016

Conversation

lucagiovagnoli
Copy link
Contributor

fixes #194 and adds some tests for the multipart_response.py file

@lucagiovagnoli
Copy link
Contributor Author

fixes both #197 and #194 bugs by replacing the logic responsible for creating the request with the one in python package "request".

@@ -21,12 +22,9 @@
from twisted.web.client import Agent
from twisted.web.client import FileBodyProducer
from twisted.web.http_headers import Headers
from yelp_uri import urllib_utf8
Copy link
Contributor

Choose a reason for hiding this comment

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

you probably can remove the need for "yelp_uri >= 1.1.0" in setup.py

Copy link
Contributor

Choose a reason for hiding this comment

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

and remove the dependency used just for debug in client.py 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.

fixed but had to port some helpers inside. still better than preventing people from using this because of yelp_uri.

return urllib.urlencode(
[(_to_utf8(k), _to_utf8(v)) for (k, v) in _pairs(query)],
*args, **kwargs
)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move these function to a separate module

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I just found out that yelp_uri is open source https://github.com/Yelp/yelp_uri so I am putting back the dependency, anybody can use it and we don't duplicate code :)

@prat0318
Copy link
Contributor

prat0318 commented Mar 4, 2016

👍

@lucagiovagnoli lucagiovagnoli changed the title fixed TypeError with multi-part form data in asynchronous client Deleting logic for handling form data in favor of python 'requests' for the Asynchronous client Mar 5, 2016
@prat0318
Copy link
Contributor

prat0318 commented Mar 5, 2016

lgtm. Can you bump the version and add an entry to changelog. should be good to merge then

prat0318 added a commit that referenced this pull request Mar 8, 2016
Deleting logic for handling form data in favor of python 'requests' for the Asynchronous client
@prat0318 prat0318 merged commit cb5f1ff into Yelp:swaggerpy Mar 8, 2016
@prat0318
Copy link
Contributor

prat0318 commented Mar 8, 2016

Merged.

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.

None yet

3 participants