aioh2 icon indicating copy to clipboard operation
aioh2 copied to clipboard

Fix error import

Open URenko opened this issue 6 years ago • 4 comments

from . import async_task in #19 is needless and will cause error ImportError: cannot import name 'async_task' from 'aioh2'

URenko avatar Jan 28 '19 02:01 URenko

async_task is actually in use at line 383?

fantix avatar Jan 28 '19 04:01 fantix

I moved async_task to protocol.py as it is only used there. Otherwise, it is troublesome to deal with the loop import.

URenko avatar Jan 28 '19 05:01 URenko

+1 this pair of changes fixed the same import error for me which I ran into on py3.7.

bcopeland avatar Mar 26 '19 16:03 bcopeland

@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

chantra avatar Jan 06 '21 23:01 chantra