10000 gh-97696 Add documentation for get_coro() behavior with eager tasks by jbower-fb · Pull Request #104189 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-97696 Add documentation for get_coro() behavior with eager tasks #104189

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

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5c30058
gh-97696 Add documentation for get_coro() behavior with eager tasks
jbower-fb May 5, 2023
248b78b
Update asyncio-task.rst
jbower-fb May 5, 2023
3205457
gh-104190: fix ubsan crash (#104191)
sunmy2019 May 5, 2023
4126669
gh-104051: fix crash in test_xxtestfuzz with -We (#104052)
iritkatriel May 5, 2023
992dead
GH-103092: port `_asyncio` freelist to module state (#104196)
kumaraditya303 May 5, 2023
be60d71
gh-64658: Expand Argument Clinic return converter docs (#104175)
erlend-aasland May 5, 2023
582fe9a
gh-68395: Avoid naming conflicts by mangling variable names in Argume…
erlend-aasland May 5, 2023
78dc058
gh-64631: Test exception messages in cloned Argument Clinic funcs (#1…
erlend-aasland May 5, 2023
d3192a2
gh-64595: Argument Clinic: Touch source file if any output file chang…
erlend-aasland May 5, 2023
5405b60
GH-96803: Add three C-API functions to make _PyInterpreterFrame less …
markshannon May 5, 2023
21fb990
gh-103533: Use PEP 669 APIs for cprofile (GH-103534)
gaogaotiantian May 5, 2023
ef989ab
gh-69152: Add _proxy_response_headers attribute to HTTPConnection (#2…
nametkin May 5, 2023
0b62e96
GH-100479: Add `pathlib.PurePath.with_segments()` (GH-103975)
barneygale May 5, 2023
0826f80
gh-99113: Share the GIL via PyInterpreterState.ceval.gil (gh-104203)
ericsnowcurrently May 5, 2023
efc84cd
gh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (gh-1…
ericsnowcurrently May 5, 2023
7192a46
gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)
ericsnowcurrently May 5, 2023
c205faa
gh-104146: Remove unused var 'parser_body_declarations' from clinic.p…
erlend-aasland May 5, 2023
b057233
gh-99113: Add PyInterpreterConfig.own_gil (gh-104204)
ericsnowcurrently May 5, 2023
0b9d0b2
gh-104144: Skip scheduling a done callback if a TaskGroup task comple…
itamaro May 5, 2023
8df75f2
gh-97696: Remove redundant #include (#104216)
jbower-fb May 5, 2023
88482c7
gh-101819: Prepare to modernize the _io extension (#104178)
vstinner May 5, 2023
810e47b
gh-102215: importlib documentation cleanups
yrro May 6, 2023
cf8ee0b
GH-97950: Use new-style index directive ('builtin') (#104164)
AA-Turner May 6, 2023
b2c254d
gh-104233: Fix "unused variable" warning in `ceval_gil.c` (#104234)
sobolevn May 6, 2023
6ab9a42
gh-65772: Clean-up turtle module (#104218)
terryjreedy May 6, 2023
b4f3496
Rewrite the turtledemo makeGraphFrame method (#104224)
terryjreedy May 6, 2023
cb70222
gh-104144: Optimize gather to finish eagerly when all futures complet…
itamaro May 6, 2023
1173ce2
gh-90953: Emit deprecation warnings for `ast` features deprecated in …
AlexWaygood May 6, 2023
a719df1
GH-103548: Improve performance of `pathlib.Path.[is_]absolute()` (GH-…
barneygale May 6, 2023
060a31e
gh-101819: Remove unused 'locale_module' from _io state (#104246)
erlend-aasland May 6, 2023
fc1e63f
gh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-10…
ericsnowcurrently May 6, 2023
74d38ea
gh-99113: Make Sure the GIL is Acquired at the Right Places (gh-104208)
ericsnowcurrently May 6, 2023
de9f9dd
gh-101640: Make argparse _print_message catch any write error (#101802)
arhadthedev May 6, 2023
fe13226
gh-104254: Document the optional keyword-only "context" argument to T…
itamaro May 7, 2023
33e8bdb
gh-103886: Improve `builtins.__doc__` (#104179)
tomasr8 May 7, 2023
44b081d
gh-97696: Use `PyObject_CallMethodNoArgs` and inline is_loop_running …
itamaro May 7, 2023
06707b9
gh-104018: remove unused format "z" handling in string formatfloat() …
belm0 May 7, 2023
7e11146
Re-enable commented-out test in test_generators.py (#104130)
ymki4360 May 7, 2023
c66f1b6
gh-101819: Port _io.PyIncrementalNewlineDecoder_Type to heap type (#1…
erlend-aasland May 7, 2023
e63898e
gh-101819: Adapt _io.PyWindowsConsoleIO_Type to heap type (#104197)
erlend-aasland May 7, 2023
18babf4
gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bi…
erlend-aasland May 7, 2023
b61f7d2
gh-101819: Port _io.PyBytesIOBuffer_Type to heap type (#104264)
erlend-aasland May 7, 2023
f06a11c
GH-100479: Fix pathlib test failure on WASI (#104215)
barneygale May 7, 2023
86ca8d2
gh-103193: cache calls to `inspect._shadowed_dict` in `inspect.getatt…
AlexWaygood May 7, 2023
c195a2c
gh-104240: make _PyCompile_CodeGen support different compilation mode…
iritkatriel May 7, 2023
3145c0f
GH-89812: Churn `pathlib.Path` methods (GH-104243)
barneygale May 7, 2023
44914e0
gh-103650: Fix perf maps address format (#103651)
art049 May 7, 2023
f6943eb
GH-102613: Improve performance of `pathlib.Path.rglob()` (GH-104244)
barneygale May 7, 2023
8e76e2d
gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (…
chgnrdv May 7, 2023
67b4b55
gh-64660: Don't hardcode Argument Clinic return converter result vari…
erlend-aasland May 7, 2023
52539f0
gh-104273: Remove redundant len() calls in argparse function (#104274)
buraksaler May 7, 2023
82a37a4
gh-99108: Replace SHA3 implementation HACL* version (#103597)
msprotz May 8, 2023
2745006
gh-97696: Improve and fix documentation for asyncio eager tasks (#104…
itamaro May 8, 2023
013469f
gh-102500: Remove mention of bytes shorthand (#104281)
hauntsaninja May 8, 2023
ffa4d19
Trim trailing whitespace and test on CI (#104275)
hugovk May 8, 2023
7714382
gh-103193: Improve `getattr_static` test coverage (#104286)
AlexWaygood May 8, 2023
a7e9a63
GH-104145: Use fully-qualified cross reference types for the bisect m…
AA-Turner May 8, 2023
82bc549
gh-99108: fix typo in Modules/Setup (#104293)
msprotz May 8, 2023
b28c5f2
gh-104223: Fix issues with inheriting from buffer classes (#104227)
JelleZijlstra May 8, 2023
a49c8a8
gh-89550: Buffer GzipFile.write to reduce execution time by ~15% (#10…
CCLDArjun May 8, 2023
b8116d8
GH-104284: Fix documentation gettext build (#104296)
AA-Turner May 8, 2023
9a51482
get_coro versionchanged info and cross-reference
jbower-fb May 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
GH-97950: Use new-style index directive ('builtin') (#104164)
* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
  • Loading branch information
AA-Turner authored and jbower-fb committed May 8, 2023
commit cf8ee0b30d9c79ada8bf867b31c41aa55d52964b
2 changes: 1 addition & 1 deletion Doc/c-api/dict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Dictionary Objects

.. c:function:: Py_ssize_t PyDict_Size(PyObject *p)

.. index:: builtin: len
.. index:: pair: built-in function; len

Return the number of items in the dictionary. This is equivalent to
``len(p)`` on a dictionary.
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Importing Modules

.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)

.. index:: builtin: __import__
.. index:: pair: built-in function; __import__

Import a module. This is best described by referring to the built-in Python
function :func:`__import__`.
Expand Down Expand Up @@ -120,7 +120,7 @@ Importing Modules

.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co)

.. index:: builtin: compile
.. index:: pair: built-in function; compile

Given a module name (possibly of the form ``package.module``) and a code object
read from a Python bytecode file or obtained from the built-in function
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ List Objects

.. c:function:: Py_ssize_t PyList_Size(PyObject *list)

.. index:: builtin: len
.. index:: pair: built-in function; len

Return the length of the list object in *list*; this is equivalent to
``len(list)`` on a list object.
Expand Down Expand Up @@ -138,7 +138,7 @@ List Objects

.. c:function:: PyObject* PyList_AsTuple(PyObject *list)

.. index:: builtin: tuple
.. index:: pair: built-in function; tuple

Return a new tuple object containing the contents of *list*; equivalent to
``tuple(list)``.
2 changes: 1 addition & 1 deletion Doc/c-api/mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
.. c:function:: Py_ssize_t PyMapping_Size(PyObject *o)
Py_ssize_t PyMapping_Length(PyObject *o)

.. index:: builtin: len
.. index:: pair: built-in function; len

Returns the number of keys in object *o* on success, and ``-1`` on failure.
This is equivalent to the Python expression ``len(o)``.
Expand Down
12 changes: 6 additions & 6 deletions Doc/c-api/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)

.. index:: builtin: divmod
.. index:: pair: built-in function; divmod

See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This is
the equivalent of the Python expression ``divmod(o1, o2)``.


.. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)

.. index:: builtin: pow
.. index:: pair: built-in function; pow

See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is the
equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
Expand All @@ -94,7 +94,7 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Absolute(PyObject *o)

.. index:: builtin: abs
.. index:: pair: built-in function; abs

Returns the absolute value of *o*, or ``NULL`` on failure. This is the equivalent
of the Python expression ``abs(o)``.
Expand Down Expand Up @@ -192,7 +192,7 @@ Number Protocol

.. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)

.. index:: builtin: pow
.. index:: pair: built-in function; pow

See the built-in function :func:`pow`. Returns ``NULL`` on failure. The operation
is done *in-place* when *o1* supports it. This is the equivalent of the Python
Expand Down Expand Up @@ -238,15 +238,15 @@ Number Protocol

.. c:function:: PyObject* PyNumber_Long(PyObject *o)

.. index:: builtin: int
.. index:: pair: built-in function; int

Returns the *o* converted to an integer object on success, or ``NULL`` on
failure. This is the equivalent of the Python expression ``int(o)``.


.. c:function:: PyObject* PyNumber_Float(PyObject *o)

.. index:: builtin: float
.. index:: pair: built-in function; float

Returns the *o* converted to a float object on success, or ``NULL`` on failure.
This is the equivalent of the Python expression ``float(o)``.
Expand Down
12 changes: 6 additions & 6 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Repr(PyObject *o)

.. index:: builtin: repr
.. index:: pair: built-in function; repr

Compute a string representation of object *o*. Returns the string
representation on success, ``NULL`` on failure. This is the equivalent of the
Expand All @@ -202,7 +202,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_ASCII(PyObject *o)

.. index:: builtin: ascii
.. index:: pair: built-in function; ascii

As :c:func:`PyObject_Repr`, compute a string representation of object *o*, but
escape the non-ASCII characters in the string returned by
Expand All @@ -227,7 +227,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Bytes(PyObject *o)

.. index:: builtin: bytes
.. index:: pair: built-in function; bytes

Compute a bytes representation of object *o*. ``NULL`` is returned on
failure and a bytes object on success. This is equivalent to the Python
Expand Down Expand Up @@ -278,7 +278,7 @@ Object Protocol

.. c:function:: Py_hash_t PyObject_Hash(PyObject *o)

.. index:: builtin: hash
.. index:: pair: built-in function; hash

Compute and return the hash value of an object *o*. On failure, return ``-1``.
This is the equivalent of the Python expression ``hash(o)``.
Expand Down Expand Up @@ -312,7 +312,7 @@ Object Protocol

.. c:function:: PyObject* PyObject_Type(PyObject *o)

.. index:: builtin: type
.. index:: pair: built-in function; type

When *o* is non-``NULL``, returns a type object corresponding to the object type
of object *o*. On failure, raises :exc:`SystemError` and returns ``NULL``. This
Expand All @@ -332,7 +332,7 @@ Object Protocol
.. c:function:: Py_ssize_t PyObject_Size(PyObject *o)
Py_ssize_t PyObject_Length(PyObject *o)

.. index:: builtin: len
.. index:: pair: built-in function; len

Return the length of object *o*. If the object *o* provides either the sequence
and mapping protocols, the sequence length is returned. On error, ``-1`` is
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Sequence Protocol
.. c:function:: Py_ssize_t PySequence_Size(PyObject *o)
Py_ssize_t PySequence_Length(PyObject *o)

.. index:: builtin: len
.. index:: pair: built-in function; len

Returns the number of objects in sequence *o* on success, and ``-1`` on
failure. This is equivalent to the Python expression ``len(o)``.
Expand Down Expand Up @@ -120,7 +120,7 @@ Sequence Protocol

.. c:function:: PyObject* PySequence_Tuple(PyObject *o)

.. index:: builtin: tuple
.. index:: pair: built-in function; tuple

Return a tuple object with the same contents as the sequence or iterable *o*,
or ``NULL`` on failure. If *o* is a tuple, a new reference will be returned,
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ or :class:`frozenset` or instances of their subtypes.

.. c:function:: Py_ssize_t PySet_Size(PyObject *anyset)

.. index:: builtin: len
.. index:: pair: built-in function; len

Return the length of a :class:`set` or :class:`frozenset` object. Equivalent to
``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ method.

.. data:: METH_CLASS

.. index:: builtin: classmethod
.. index:: pair: built-in function; classmethod

The method will be passed the type object as the first parameter rather
than an instance of the type. This is used to create *class methods*,
Expand All @@ -357,7 +357,7 @@ method.

.. data:: METH_STATIC

.. index:: builtin: staticmethod
.. index:: pair: built-in function; staticmethod

The method will be passed ``NULL`` as the first parameter rather than an
instance of the type. This is used to create *static methods*, similar to
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)

.. c:member:: reprfunc PyTypeObject.tp_repr

.. index:: builtin: repr
.. index:: pair: built-in function; repr

An optional pointer to a function that implements the built-in function
:func:`repr`.
Expand Down Expand Up @@ -870,7 +870,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)

.. c:member:: hashfunc PyTypeObject.tp_hash

.. index:: builtin: hash
.. index:: pair: built-in function; hash

An optional pointer to a function that implements the built-in function
:func:`hash`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/extending/newtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ done. This can be done using the :c:func:`PyErr_Fetch` and

.. index::
single: string; object representation
builtin: repr
pair: built-in function; repr

Object Presentation
-------------------
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ iterations of the loop.

.. opcode:: BUILD_SLICE (argc)

.. index:: builtin: slice
.. index:: pair: built-in function; slice

Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, implements::

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ are always available. They are listed here in alphabetical order.
Raises an :ref:`auditing event <auditing>` ``exec`` with the code object
as the argument. Code compilation events may also be raised.

.. index:: builtin: exec
.. index:: pair: built-in function; exec

.. function:: exec(object, globals=None, locals=None, /, *, closure=None)

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/pprint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ The :mod:`pprint` module defines one class:

.. function:: isreadable(object)

.. index:: builtin: eval
.. index:: pair: built-in function; eval

Determine if the formatted representation of *object* is "readable", or can be
used to reconstruct the value using :func:`eval`. This always returns ``False``
Expand Down Expand Up @@ -218,7 +218,7 @@ created.

.. method:: PrettyPrinter.isreadable(object)

.. index:: builtin: eval
.. index:: pair: built-in function; eval

Determine if the formatted representation of the object is "readable," or can be
used to reconstruct the value using :func:`eval`. Note that this returns
Expand Down
24 changes: 12 additions & 12 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ and imaginary parts.

.. index::
single: arithmetic
builtin: int
builtin: float
builtin: complex
pair: built-in function; int
pair: built-in function; float
pair: built-in function; complex
single: operator; + (plus)
single: + (plus); unary operator
single: + (plus); binary operator
Expand Down Expand Up @@ -945,9 +945,9 @@ operations have the same priority as the corresponding numeric operations. [3]_

.. index::
triple: operations on; sequence; types
builtin: len
builtin: min
builtin: max
pair: built-in function; len
pair: built-in function; min
pair: built-in function; max
pair: concatenation; operation
pair: repetition; operation
pair: subscript; operation
Expand Down Expand Up @@ -1113,7 +1113,7 @@ Immutable Sequence Types
.. index::
triple: immutable; sequence; types
pair: object; tuple
builtin: hash
pair: built-in function; hash

The only operation that immutable sequence types generally implement that is
not also implemented by mutable sequence types is support for the :func:`hash`
Expand Down Expand Up @@ -4419,7 +4419,7 @@ Mapping Types --- :class:`dict`
triple: operations on; mapping; types
triple: operations on; dictionary; type
pair: statement; del
builtin: len
pair: built-in function; len

A :term:`mapping` object maps :term:`hashable` values to arbitrary objects.
Mappings are mutable objects. There is currently only one standard mapping
Expand Down Expand Up @@ -5348,7 +5348,7 @@ Code Objects
------------

.. index::
builtin: compile
pair: built-in function; compile
single: __code__ (function object attribute)

Code objects are used by the implementation to represent "pseudo-compiled"
Expand All @@ -5362,8 +5362,8 @@ Accessing ``__code__`` raises an :ref:`auditing event <auditing>`
``object.__getattr__`` with arguments ``obj`` and ``"__code__"``.

.. index::
builtin: exec
builtin: eval
pair: built-in function; exec
pair: built-in function; eval

A code object can be executed or evaluated by passing it (instead of a source
string) to the :func:`exec` or :func:`eval` built-in functions.
Expand All @@ -5377,7 +5377,7 @@ Type Objects
------------

.. index::
builtin: type
pair: built-in function; type
pair: module; types

Type objects represent the various object types. An object's type is accessed
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/types.rst
CD2F
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Standard names are defined for the following types:

.. class:: CodeType(**kwargs)

.. index:: builtin: compile
.. index:: pair: built-in function; compile

The type for code objects such as returned by :func:`compile`.

Expand Down
2 changes: 1 addition & 1 deletion Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ those made in the suite of the for-loop::


.. index::
builtin: range
pair: built-in function; range

Names in the target list are not deleted when the loop is finished, but if the
sequence is empty, they will not have been assigned to at all by the loop. Hint:
Expand Down
Loading
0