Skip to content

Commit af3f638

Browse files
committed
Deploying to gh-pages from @ fdd778f 🚀
1 parent 55d2952 commit af3f638

File tree

567 files changed

+6348
-6120
lines changed

Some content is hidden

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

567 files changed

+6348
-6120
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: bcd5c39aa6a0461e8127fb06b2b555a2
3+
config: 64a56973ab8d1696f228e45e9205d035
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/apiabiversion.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
5858
Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is
5959
hexversion ``0x030a00f0``.
6060

61+
Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``.
62+
6163
This version is also available via the symbol :data:`Py_Version`.
6264

6365
.. c:var:: const unsigned long Py_Version

_sources/c-api/structures.rst.txt

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -247,29 +247,30 @@ Implementing functions and methods
247247
Structure used to describe a method of an extension type. This structure has
248248
four fields:
249249
250-
+------------------+---------------+-------------------------------+
251-
| Field | C Type | Meaning |
252-
+==================+===============+===============================+
253-
| :attr:`ml_name` | const char \* | name of the method |
254-
+------------------+---------------+-------------------------------+
255-
| :attr:`ml_meth` | PyCFunction | pointer to the C |
256-
| | | implementation |
257-
+------------------+---------------+-------------------------------+
258-
| :attr:`ml_flags` | int | flag bits indicating how the |
259-
| | | call should be constructed |
260-
+------------------+---------------+-------------------------------+
261-
| :attr:`ml_doc` | const char \* | points to the contents of the |
262-
| | | docstring |
263-
+------------------+---------------+-------------------------------+
250+
.. c:member:: const char* ml_name
251+
252+
name of the method
253+
254+
.. c:member:: PyCFunction ml_meth
255+
256+
pointer to the C implementation
257+
258+
.. c:member:: int ml_flags
259+
260+
flags bits indicating how the call should be constructed
261+
262+
.. c:member:: const char* ml_doc
263+
264+
points to the contents of the docstring
264265
265-
The :attr:`ml_meth` is a C function pointer. The functions may be of different
266+
The :c:member:`ml_meth` is a C function pointer. The functions may be of different
266267
types, but they always return :c:expr:`PyObject*`. If the function is not of
267268
the :c:type:`PyCFunction`, the compiler will require a cast in the method table.
268269
Even though :c:type:`PyCFunction` defines the first parameter as
269270
:c:expr:`PyObject*`, it is common that the method implementation uses the
270271
specific C type of the *self* object.
271272
272-
The :attr:`ml_flags` field is a bitfield which can include the following flags.
273+
The :c:member:`ml_flags` field is a bitfield which can include the following flags.
273274
The individual flags indicate either a calling convention or a binding
274275
convention.
275276

_sources/library/asyncio-eventloop.rst.txt

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ an event loop:
3333

3434
Return the running event loop in the current OS thread.
3535

36-
If there is no running event loop a :exc:`RuntimeError` is raised.
36+
Raise a :exc:`RuntimeError` if there is no running event loop.
37+
3738
This function can only be called from a coroutine or a callback.
3839

3940
.. versionadded:: 3.7
@@ -42,27 +43,35 @@ an event loop:
4243

4344
Get the current event loop.
4445

45-
If there is no current event loop set in the current OS thread,
46-
the OS thread is main, and :func:`set_event_loop` has not yet
47-
been called, asyncio will create a new event loop and set it as the
48-
current one.
46+
When called from a coroutine or a callback (e.g. scheduled with
47+
call_soon or similar API), this function will always return the
48+
running event loop.
49+
50+
If there is no running event loop set, the function will return
51+
the result of ``get_event_loop_policy().get_event_loop()`` call.
4952

5053
Because this function has rather complex behavior (especially
5154
when custom event loop policies are in use), using the
5255
:func:`get_running_loop` function is preferred to :func:`get_event_loop`
5356
in coroutines and callbacks.
5457

55-
Consider also using the :func:`asyncio.run` function instead of using
56-
lower level functions to manually create and close an event loop.
58+
As noted above, consider using the higher-level :func:`asyncio.run` function,
59+
instead of using these lower level functions to manually create and close an
60+
event loop.
5761

5862
.. deprecated:: 3.10
59-
Deprecation warning is emitted if there is no running event loop.
60-
In future Python releases, this function will be an alias of
61-
:func:`get_running_loop`.
63+
Deprecation warning is emitted if there is no current event loop.
64+
In Python 3.12 it will be an error.
65+
66+
.. note::
67+
In Python versions 3.10.0--3.10.8 and 3.11.0 this function
68+
(and other functions which used it implicitly) emitted a
69+
:exc:`DeprecationWarning` if there was no running event loop, even if
70+
the current loop was set.
6271

6372
.. function:: set_event_loop(loop)
6473

65-
Set *loop* as a current event loop for the current OS thread.
74+
Set *loop* as the current event loop for the current OS thread.
6675

6776
.. function:: new_event_loop()
6877

@@ -906,7 +915,8 @@ Watching file descriptors
906915

907916
.. method:: loop.remove_reader(fd)
908917

909-
Stop monitoring the *fd* file descriptor for read availability.
918+
Stop monitoring the *fd* file descriptor for read availability. Returns
919+
``True`` if *fd* was previously being monitored for reads.
910920

911921
.. method:: loop.add_writer(fd, callback, *args)
912922

@@ -919,7 +929,8 @@ Watching file descriptors
919929

920930
.. method:: loop.remove_writer(fd)
921931

922-
Stop monitoring the *fd* file descriptor for write availability.
932+
Stop monitoring the *fd* file descriptor for write availability. Returns
933+
``True`` if *fd* was previously being monitored for writes.
923934

924935
See also :ref:`Platform Support <asyncio-platform-support>` section
925936
for some limitations of these methods.

_sources/library/asyncio-llapi-index.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Obtaining the Event Loop
1919
- The **preferred** function to get the running event loop.
2020

2121
* - :func:`asyncio.get_event_loop`
22-
- Get an event loop instance (current or via the policy).
22+
- Get an event loop instance (running or current via the current policy).
2323

2424
* - :func:`asyncio.set_event_loop`
2525
- Set the event loop as current via the current policy.

_sources/library/asyncio-policy.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ asyncio ships with the following built-in policies:
112112

113113
On Windows, :class:`ProactorEventLoop` is now used by default.
114114

115+
.. deprecated:: 3.11.1
116+
:meth:`get_event_loop` now emits a :exc:`DeprecationWarning` if there
117+
is no current event loop set and a new event loop has been implicitly
118+
created. In Python 3.12 it will be an error.
119+
115120

116121
.. class:: WindowsSelectorEventLoopPolicy
117122

_sources/library/asyncio-stream.rst.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ and work with streams:
5252
limit=None, ssl=None, family=0, proto=0, \
5353
flags=0, sock=None, local_addr=None, \
5454
server_hostname=None, ssl_handshake_timeout=None, \
55+
ssl_shutdown_timeout=None, \
5556
happy_eyeballs_delay=None, interleave=None)
5657

5758
Establish a network connection and return a pair of
@@ -82,14 +83,17 @@ and work with streams:
8283
.. versionchanged:: 3.10
8384
Removed the *loop* parameter.
8485

86+
.. versionchanged:: 3.11
87+
Added the *ssl_shutdown_timeout* parameter.
88+
8589

8690
.. coroutinefunction:: start_server(client_connected_cb, host=None, \
8791
port=None, *, limit=None, \
8892
family=socket.AF_UNSPEC, \
8993
flags=socket.AI_PASSIVE, sock=None, \
9094
backlog=100, ssl=None, reuse_address=None, \
9195
reuse_port=None, ssl_handshake_timeout=None, \
92-
start_serving=True)
96+
ssl_shutdown_timeout=None, start_serving=True)
9397
9498
Start a socket server.
9599

@@ -121,12 +125,15 @@ and work with streams:
121125
.. versionchanged:: 3.10
122126
Removed the *loop* parameter.
123127

128+
.. versionchanged:: 3.11
129+
Added the *ssl_shutdown_timeout* parameter.
130+
124131

125132
.. rubric:: Unix Sockets
126133

127134
.. coroutinefunction:: open_unix_connection(path=None, *, limit=None, \
128135
ssl=None, sock=None, server_hostname=None, \
129-
ssl_handshake_timeout=None)
136+
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
130137

131138
Establish a Unix socket connection and return a pair of
132139
``(reader, writer)``.
@@ -150,10 +157,14 @@ and work with streams:
150157
.. versionchanged:: 3.10
151158
Removed the *loop* parameter.
152159

160+
.. versionchanged:: 3.11
161+
Added the *ssl_shutdown_timeout* parameter.
162+
153163

154164
.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
155165
*, limit=None, sock=None, backlog=100, ssl=None, \
156-
ssl_handshake_timeout=None, start_serving=True)
166+
ssl_handshake_timeout=None, \
167+
ssl_shutdown_timeout=None, start_serving=True)
157168
158169
Start a Unix socket server.
159170

@@ -176,6 +187,9 @@ and work with streams:
176187
.. versionchanged:: 3.10
177188
Removed the *loop* parameter.
178189

190+
.. versionchanged:: 3.11
191+
Added the *ssl_shutdown_timeout* parameter.
192+
179193

180194
StreamReader
181195
============

_sources/library/dataclasses.rst.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ Module contents
7979
class C:
8080
...
8181

82-
@dataclass(init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)
82+
@dataclass(init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False,
83+
match_args=True, kw_only=False, slots=False, weakref_slot=False)
8384
class C:
8485
...
8586

_sources/library/datetime.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2589,7 +2589,7 @@ Notes:
25892589

25902590
(9)
25912591
When used with the :meth:`strptime` method, the leading zero is optional
2592-
for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%J``, ``%U``,
2592+
for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``,
25932593
``%W``, and ``%V``. Format ``%y`` does require a leading zero.
25942594

25952595
.. rubric:: Footnotes

0 commit comments

Comments
 (0)