Staging
v0.5.1
https://github.com/python/cpython
Revision a5906b2bfce9560568dee1dcc3550e74e742dd34 authored by Miss Islington (bot) on 25 January 2020, 14:53:08 UTC, committed by Karthikeyan Singaravelan on 25 January 2020, 14:53:08 UTC
If an autospecced object is attached using attach_mock the
child would be a function with mock object as attribute from
which signature has to be derived.

(cherry picked from commit 66b00a9d3aacf6ed49412f48743e4913104a2bb3)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
1 parent a234492
Raw File
Tip revision: a5906b2bfce9560568dee1dcc3550e74e742dd34 authored by Miss Islington (bot) on 25 January 2020, 14:53:08 UTC
bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (GH-18167)
Tip revision: a5906b2
coro.rst
.. highlight:: c

.. _coro-objects:

Coroutine Objects
-----------------

.. versionadded:: 3.5

Coroutine objects are what functions declared with an ``async`` keyword
return.


.. c:type:: PyCoroObject

   The C structure used for coroutine objects.


.. c:var:: PyTypeObject PyCoro_Type

   The type object corresponding to coroutine objects.


.. c:function:: int PyCoro_CheckExact(PyObject *ob)

   Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``.


.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)

   Create and return a new coroutine object based on the *frame* object,
   with ``__name__`` and ``__qualname__`` set to *name* and *qualname*.
   A reference to *frame* is stolen by this function.  The *frame* argument
   must not be ``NULL``.
back to top