-
Notifications
You must be signed in to change notification settings - Fork 550
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
restore uvloop.new_event_loop and other missing uvloop members to typing #573
restore uvloop.new_event_loop and other missing uvloop members to typing #573
Conversation
e08494f
to
83fbb49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding this file removed the useful members like 'new_event_loop' which is needed for asyncio.Runner(...)
0370a92
to
ec9c6ce
Compare
d887fa4
to
7ea847c
Compare
@fantix can I get a review on this please? It's blocking mypy in unicorn |
loop.set_debug(debug) | ||
return loop.run_until_complete(wrapper()) | ||
finally: | ||
if _typing.TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just inline the typing and omit this TYPE_CHECKING check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, if you see the history of the PR, but it took too many changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now. What about adding new_event_loop
to __init__.pyi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that first also and it means the other members aren't type checked
loop.set_debug(debug) | ||
return loop.run_until_complete(wrapper()) | ||
finally: | ||
if _typing.TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now. What about adding new_event_loop
to __init__.pyi
?
Changes ======= * Drop support of Python 3.7 and update CI (#578) (by @fantix in ee5ad26 for #578) Fixes ===== * Restore uvloop.new_event_loop and other missing uvloop members to typing (#573) (by @graingert in 5c500ee for #573) * Fix docstring of loop.shutdown_default_executor (#535) (by @Gelbpunkt in 919da56 for #535) * Fix CI status badge (#522) (by @shuuji3 in 0e9ff6c for #522)
No description provided.