-
Notifications
You must be signed in to change notification settings - Fork 29
Boolean parameter refresh is broken #73
Comments
Monkeypatch workaround
|
Would you provide a patch which fixes aioes, without yarl monkeypatching? |
There're two ways of solving this problem: modifying yarl for bool support and replacing bool parameters everywhere is aioes. What can you consider correct? |
The second one |
…arl raise 'Invalid variable type' TypeError
Any plans on merging this and doing a new release soon? |
@wintamute I would prefer to be able to convert from bool instead passing as is. |
@neumond I agree, I was referring to the commit above (DLizogub@77c4d56) |
A less hackish monkey-patch to workaround this issue as well as #112 from aioes.connection import Connection
__original_perform_request = Connection.perform_request
def perform_request(self, method, url, params, body):
url = url.lstrip('/') # Fixes issue #112
if params:
for key, value in params.items():
if isinstance(value, bool):
params[key] = str(value).lower()
return __original_perform_request(self, method, url, params, body)
Connection.perform_request = perform_request |
Hey, guys! Please check this out with latest master! |
Looks very much so. Many thanks for giving some love to ES5 support. |
You can clearly see here conversion of parameter to boolean type.
https://github.com/aio-libs/aioes/blob/master/aioes/client/__init__.py#L133
Then it fails here
https://github.com/aio-libs/yarl/blob/master/yarl/__init__.py#L673
Considering this, there's no way to use
refresh
parameter at all.The text was updated successfully, but these errors were encountered: