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

AioHTTPTestCase doesn't work with uvloop #2491

Closed
aptiko opened this issue Nov 9, 2017 · 7 comments
Closed

AioHTTPTestCase doesn't work with uvloop #2491

aptiko opened this issue Nov 9, 2017 · 7 comments
Labels

Comments

@aptiko
Copy link

aptiko commented Nov 9, 2017

I can't tell whether this is a shortcoming of uvloop or a bug of aiohttp, but here it goes:

8e76a4a added this statement:

policy.set_child_watcher(watcher)

The problem is that uvloop's event policy subclasses asyncio.AbstractEventLoop, which doesn't implement set_child_watcher() (it raises NotImplementedError). Maybe it should subclass DefaultEventLoopPolicy, but I don't really know. In any case, attempting to run any AioHTTPTestCase with uvloop results in a NotImplementedError.

aiohttp 2.2 apparently doesn't have this problem.

@asvetlov
Copy link
Member

asvetlov commented Nov 9, 2017

Reported to uvloop team.
set_child_watcher is a part of AbstractEventLoopPolicy public API, uvloop should implement the method IMHO.
@1st1 ?

@1st1
Copy link
Contributor

1st1 commented Nov 9, 2017

uvloop doesn't need watchers, it won't be able to use them at all. We can just implement an empty set_child_watcher, if that helps.

@asvetlov
Copy link
Member

asvetlov commented Nov 9, 2017

Please do.
Otherwise aiohttp need a check for uvloop policy which is a weird.

@1st1
Copy link
Contributor

1st1 commented Nov 9, 2017

It won't happen right away, so for now I suggest you to just ignore NotImplementedError.

@asvetlov
Copy link
Member

Makes sense.

@asvetlov
Copy link
Member

Fixed by 2445993

@lock
Copy link

lock bot commented Oct 28, 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].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

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

No branches or pull requests

3 participants