Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit daf50a8

Browse files
author
Anselm Kruis
committed
Merge tag v3.8.0 into 3.8-slp
2 parents e61be11 + fa919fd commit daf50a8

File tree

94 files changed

+1905
-1041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1905
-1041
lines changed

Doc/extending/newtypes_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ set to *NULL*. ::
182182
Py_INCREF(&CustomType);
183183
if (PyModule_AddObject(m, "Custom", (PyObject *) &CustomType) < 0) {
184184
Py_DECREF(&CustomType);
185-
PY_DECREF(m);
185+
Py_DECREF(m);
186186
return NULL;
187187
}
188188

Doc/library/argparse.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ Sub-commands
15951595
stored; by default ``None`` and no value is stored
15961596

15971597
* required_ - Whether or not a subcommand must be provided, by default
1598-
``False``.
1598+
``False`` (added in 3.7)
15991599

16001600
* help_ - help for sub-parser group in help output, by default ``None``
16011601

@@ -1751,6 +1751,9 @@ Sub-commands
17511751
>>> parser.parse_args(['2', 'frobble'])
17521752
Namespace(subparser_name='2', y='frobble')
17531753

1754+
.. versionchanged:: 3.7
1755+
New *required* keyword argument.
1756+
17541757

17551758
FileType objects
17561759
^^^^^^^^^^^^^^^^

Doc/library/asyncio-eventloop.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
Event Loop
66
==========
77

8+
**Source code:** :source:`Lib/asyncio/events.py`,
9+
:source:`Lib/asyncio/base_events.py`
10+
11+
------------------------------------
812

913
.. rubric:: Preface
1014

Doc/library/asyncio-exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
Exceptions
88
==========
99

10+
**Source code:** :source:`Lib/asyncio/exceptions.py`
11+
12+
----------------------------------------------------
1013

1114
.. exception:: TimeoutError
1215

Doc/library/asyncio-future.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
Futures
88
=======
99

10+
**Source code:** :source:`Lib/asyncio/futures.py`,
11+
:source:`Lib/asyncio/base_futures.py`
12+
13+
-------------------------------------
14+
1015
*Future* objects are used to bridge **low-level callback-based code**
1116
with high-level async/await code.
1217

Doc/library/asyncio-platforms.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ All Platforms
2323
Windows
2424
=======
2525

26+
**Source code:** :source:`Lib/asyncio/proactor_events.py`,
27+
:source:`Lib/asyncio/windows_events.py`,
28+
:source:`Lib/asyncio/windows_utils.py`
29+
30+
--------------------------------------
31+
2632
.. versionchanged:: 3.8
2733

2834
On Windows, :class:`ProactorEventLoop` is now the default event loop.

Doc/library/asyncio-protocol.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ This documentation page contains the following sections:
6969
Transports
7070
==========
7171

72+
**Source code:** :source:`Lib/asyncio/transports.py`
73+
74+
----------------------------------------------------
75+
7276
Transports are classes provided by :mod:`asyncio` in order to abstract
7377
various kinds of communication channels.
7478

@@ -431,6 +435,10 @@ Subprocess Transports
431435
Protocols
432436
=========
433437

438+
**Source code:** :source:`Lib/asyncio/protocols.py`
439+
440+
---------------------------------------------------
441+
434442
asyncio provides a set of abstract base classes that should be used
435443
to implement network protocols. Those classes are meant to be used
436444
together with :ref:`transports <asyncio-transport>`.

Doc/library/asyncio-queue.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
Queues
77
======
88

9+
**Source code:** :source:`Lib/asyncio/queues.py`
10+
11+
------------------------------------------------
12+
913
asyncio queues are designed to be similar to classes of the
1014
:mod:`queue` module. Although asyncio queues are not thread-safe,
1115
they are designed to be used specifically in async/await code.

Doc/library/asyncio-stream.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
Streams
77
=======
88

9+
**Source code:** :source:`Lib/asyncio/streams.py`
10+
11+
-------------------------------------------------
12+
913
Streams are high-level async/await-ready primitives to work with
1014
network connections. Streams allow sending and receiving data without
1115
using callbacks or low-level protocols and transports.

Doc/library/asyncio-subprocess.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
Subprocesses
77
============
88

9+
**Source code:** :source:`Lib/asyncio/subprocess.py`,
10+
:source:`Lib/asyncio/base_subprocess.py`
11+
12+
----------------------------------------
13+
914
This section describes high-level async/await asyncio APIs to
1015
create and manage subprocesses.
1116

Doc/library/asyncio-sync.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
Synchronization Primitives
77
==========================
88

9+
**Source code:** :source:`Lib/asyncio/locks.py`
10+
11+
-----------------------------------------------
12+
913
asyncio synchronization primitives are designed to be similar to
1014
those of the :mod:`threading` module with two important caveats:
1115

Doc/library/asyncio-task.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ and Tasks.
1818
Coroutines
1919
==========
2020

21-
Coroutines declared with async/await syntax is the preferred way of
22-
writing asyncio applications. For example, the following snippet
23-
of code (requires Python 3.7+) prints "hello", waits 1 second,
21+
:term:`Coroutines <coroutine>` declared with the async/await syntax is the
22+
preferred way of writing asyncio applications. For example, the following
23+
snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
2424
and then prints "world"::
2525

2626
>>> import asyncio
@@ -238,6 +238,10 @@ Running an asyncio Program
238238
.. versionadded:: 3.7
239239

240240

241+
.. note::
242+
The source code for ``asyncio.run()`` can be found in
243+
:source:`Lib/asyncio/runners.py`.
244+
241245
Creating Tasks
242246
==============
243247

Doc/library/asyncio.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.. module:: asyncio
55
:synopsis: Asynchronous I/O.
66

7-
--------------
7+
-------------------------------
88

99
.. sidebar:: Hello World!
1010

@@ -91,3 +91,6 @@ Additionally, there are **low-level** APIs for
9191
asyncio-api-index.rst
9292
asyncio-llapi-index.rst
9393
asyncio-dev.rst
94+
95+
.. note::
96+
The source code for asyncio can be found in :source:`Lib/asyncio/`.

0 commit comments

Comments
 (0)