aioh2
aioh2 copied to clipboard
Fix error import
from . import async_task
in #19 is needless and will cause error
ImportError: cannot import name 'async_task' from 'aioh2'
async_task
is actually in use at line 383?
I moved async_task
to protocol.py as it is only used there.
Otherwise, it is troublesome to deal with the loop import.
+1 this pair of changes fixed the same import error for me which I ran into on py3.7.
@fantix would you mind porting @URenko 's patch to aioh2 and make a new release? aioh2 is currently unusable with any recent python3 versions and people are struggling with dependencies.
Patches available from https://github.com/URenko/aioh2
https://github.com/URenko/aioh2/commit/8c1b5ab2399443087795fe52b71e43b652b1031f and https://github.com/URenko/aioh2/commit/933e5159aaef540d8154274cf08747ca17c878e8
which are essentially this diff.
Example issues on the dohproxy side: https://github.com/facebookexperimental/doh-proxy/issues/63 https://github.com/facebookexperimental/doh-proxy/issues/73 https://github.com/facebookexperimental/doh-proxy/issues/93
Landing this diff and making a new release would also close #21