-
Notifications
You must be signed in to change notification settings - Fork 150
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
Aiohttp and with_bind method not working together #518
Comments
Hi, sorry for late reply. |
To my mind it was not necessary to change signature of the method inside Currently async def set_bind(self, bind, loop=None, **kwargs): but ONLY async def set_bind(self, bind, **kwargs): Take a look pls on https://github.com/fantix/gino/blob/master/gino/api.py#L180, So I suggest to revert only async def set_bind(self, bind, loop=None, **kwargs): One more point, now it violates with one of the base of the OOP principle: Liskov substitution |
Generally, yes, we should keep the signatures same for parent and child classes. But in practice, it's not possible to follow all the principles. |
Oh, that's very disappointing... I guess I'm stupid, but may you explain in details what was the problem with previous I see that in async def set_bind(self, bind, loop=None, **kwargs):
kwargs.setdefault('strategy', 'aiohttp')
return await super().set_bind(bind, loop=loop, **kwargs) Why removing optional P.S. I'm using |
Probably should do Signature change is definitely not ideal, but to me it's the better choice here. If I misunderstand, let me know what you actually mean. :) I feel it's a dilemma maintaining extensions as they're not versioned. When the dependency makes breaking changes, though it's good to keep up, it may also break existing code. Maybe a better choice is to maintain the extension in another (versioned) library, or even in the project itself. |
Closing due to inactivity. Feel free to reopen. |
Very odd to see that making |
what do @fantix think about this? Is it normal that the |
I don't quite remember what happened but I think I misunderstood. Sorry for that. |
@Reskov you're right. I think we should add Sorry for inconvenience. |
parameter `loop` was removed in 5e5eabb, which broke the use of with_bind
port change in python-gino/gino@c42de94
port change in python-gino/gino@c42de94
port change in python-gino/gino@c42de94
Description
with_bind
does not work anymore withaiohttp
extension after commit 5e5eabbwith_bind
are passing loop as an positional argument, but positional argument was removed in gino 0.8.3, and only foraiohttp
engine:(Is this expected?
What I Did
The text was updated successfully, but these errors were encountered: