Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-122858: Deprecate asyncio.iscoroutinefunction #122875

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

Merged
merged 16 commits into from
Aug 11, 2024
Merged
Prev Previous commit
Next Next commit
use coroutines.iscoroutine and coroutines._iscoroutinefunction
  • Loading branch information
Wulian233 authored Aug 10, 2024
commit 750d2943a3bf04f0cf4323f9f26ef0d02d2abbb8
5 changes: 2 additions & 3 deletions 5 Lib/asyncio/unix_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ def add_signal_handler(self, sig, callback, *args):
Raise ValueError if the signal number is invalid or uncatchable.
Raise RuntimeError if there is a problem setting up the handler.
"""
import inspect
if (inspect.iscoroutine(callback) or
inspect.iscoroutinefunction(callback)):
if (coroutines.iscoroutine(callback) or
coroutines._iscoroutinefunction(callback)):
raise TypeError("coroutines cannot be used "
"with add_signal_handler()")
self._check_signal(sig)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.