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

UrlDispatcher.add_route with partial coroutine handler #814

Merged
merged 2 commits into from Mar 12, 2016
Merged

UrlDispatcher.add_route with partial coroutine handler #814

merged 2 commits into from Mar 12, 2016

Conversation

ghost
Copy link

@ghost ghost commented Mar 5, 2016

fix for problem when partialy applied coroutine is used as handler for UrlDispatcher.add_route

similar issue:
http://bugs.python.org/issue23519

@asyncio.coroutine
def handler_wrapper(*args, **kwargs):
result = handler(*args, **kwargs)
if asyncio.iscoroutine(result):
Copy link
Member

Choose a reason for hiding this comment

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

Please add a check for asyncio.Future also.

Copy link
Author

Choose a reason for hiding this comment

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

according to current documentation (for UrlDispatcher.add_route and Resource.add_route) handler should be callable which excludes asyncio.Future

@asvetlov
Copy link
Member

asvetlov commented Mar 7, 2016

Tests needed.

@ghost
Copy link
Author

ghost commented Mar 8, 2016

test added

asvetlov added a commit that referenced this pull request Mar 12, 2016
UrlDispatcher.add_route with partial coroutine handler
@asvetlov asvetlov merged commit dd335c1 into aio-libs:master Mar 12, 2016
@asvetlov
Copy link
Member

thanks

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant