MCPcopy Index your code
hub / github.com/python/cpython / __step

Method __step

Lib/asyncio/tasks.py:266–281  ·  view source on GitHub ↗
(self, exc=None)

Source from the content-addressed store, hash-verified

264 _py_register_task(self)
265
266 def __step(self, exc=None):
267 if self.done():
268 raise exceptions.InvalidStateError(
269 f'__step(): already done: {self!r}, {exc!r}')
270 if self._must_cancel:
271 if not isinstance(exc, exceptions.CancelledError):
272 exc = self._make_cancelled_error()
273 self._must_cancel = False
274 self._fut_waiter = None
275
276 _py_enter_task(self._loop, self)
277 try:
278 self.__step_run_and_handle_result(exc)
279 finally:
280 _py_leave_task(self._loop, self)
281 self = None # Needed to break cycles when an exception occurs.
282
283 def __step_run_and_handle_result(self, exc):
284 coro = self._coro

Callers 1

__wakeupMethod · 0.95

Calls 3

doneMethod · 0.95
_make_cancelled_errorMethod · 0.80

Tested by

no test coverage detected