Skip to content

Commit e0f5fba

Browse files
committed
Deploying to gh-pages from @ f24fd11 🚀
1 parent 40bb88f commit e0f5fba

File tree

543 files changed

+1192
-823
lines changed

Some content is hidden

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

543 files changed

+1192
-823
lines changed

_sources/c-api/call.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ This is a pointer to a function with the following signature:
108108
Doing so will allow callables such as bound methods to make their onward
109109
calls (which include a prepended *self* argument) very efficiently.
110110

111+
.. versionadded:: 3.8
112+
111113
To call an object that implements vectorcall, use a :ref:`call API <capi-call>`
112114
function as with any other callable.
113115
:c:func:`PyObject_Vectorcall` will usually be most efficient.

_sources/howto/regex.rst.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ You can omit either *m* or *n*; in that case, a reasonable value is assumed for
245245
the missing value. Omitting *m* is interpreted as a lower limit of 0, while
246246
omitting *n* results in an upper bound of infinity.
247247

248+
The simplest case ``{m}`` matches the preceding item exactly *m* times.
249+
For example, ``a/{2}b`` will only match ``'a//b'``.
250+
248251
Readers of a reductionist bent may notice that the three other quantifiers can
249252
all be expressed using this notation. ``{0,}`` is the same as ``*``, ``{1,}``
250253
is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's better to use

_sources/library/asyncio-eventloop.rst.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ Scheduling callbacks
243243
See the :ref:`concurrency and multithreading <asyncio-multithreading>`
244244
section of the documentation.
245245

246-
.. versionchanged:: 3.7
247-
The *context* keyword-only parameter was added. See :pep:`567`
248-
for more details.
246+
.. versionchanged:: 3.7
247+
The *context* keyword-only parameter was added. See :pep:`567`
248+
for more details.
249249

250250
.. _asyncio-pass-keywords:
251251

@@ -661,6 +661,8 @@ Opening network connections
661661
Creating network servers
662662
^^^^^^^^^^^^^^^^^^^^^^^^
663663

664+
.. _loop_create_server:
665+
664666
.. coroutinemethod:: loop.create_server(protocol_factory, \
665667
host=None, port=None, *, \
666668
family=socket.AF_UNSPEC, \
@@ -1191,6 +1193,8 @@ Working with pipes
11911193
Unix signals
11921194
^^^^^^^^^^^^
11931195

1196+
.. _loop_add_signal_handler:
1197+
11941198
.. method:: loop.add_signal_handler(signum, callback, *args)
11951199

11961200
Set *callback* as the handler for the *signum* signal.
@@ -1391,6 +1395,14 @@ Enabling debug mode
13911395
The new :ref:`Python Development Mode <devmode>` can now also be used
13921396
to enable the debug mode.
13931397

1398+
.. attribute:: loop.slow_callback_duration
1399+
1400+
This attribute can be used to set the
1401+
minimum execution duration in seconds that is considered "slow".
1402+
When debug mode is enabled, "slow" callbacks are logged.
1403+
1404+
Default value is 100 milliseconds.
1405+
13941406
.. seealso::
13951407

13961408
The :ref:`debug mode of asyncio <asyncio-debug-mode>`.
@@ -1411,6 +1423,8 @@ async/await code consider using the high-level
14111423
:ref:`Subprocess Support on Windows <asyncio-windows-subprocess>` for
14121424
details.
14131425

1426+
.. _loop_subprocess_exec:
1427+
14141428
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \
14151429
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
14161430
stderr=subprocess.PIPE, **kwargs)

_sources/library/asyncio.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Additionally, there are **low-level** APIs for
4646
*library and framework developers* to:
4747

4848
* create and manage :ref:`event loops <asyncio-event-loop>`, which
49-
provide asynchronous APIs for :meth:`networking <loop.create_server>`,
50-
running :meth:`subprocesses <loop.subprocess_exec>`,
51-
handling :meth:`OS signals <loop.add_signal_handler>`, etc;
49+
provide asynchronous APIs for :ref:`networking <loop_create_server>`,
50+
running :ref:`subprocesses <loop_subprocess_exec>`,
51+
handling :ref:`OS signals <loop_add_signal_handler>`, etc;
5252

5353
* implement efficient protocols using
5454
:ref:`transports <asyncio-transports-protocols>`;

_sources/library/bz2.rst.txt

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The :mod:`bz2` module contains:
9191
and :meth:`~io.IOBase.truncate`.
9292
Iteration and the :keyword:`with` statement are supported.
9393

94-
:class:`BZ2File` also provides the following method:
94+
:class:`BZ2File` also provides the following methods:
9595

9696
.. method:: peek([n])
9797

@@ -106,14 +106,52 @@ The :mod:`bz2` module contains:
106106

107107
.. versionadded:: 3.3
108108

109+
.. method:: fileno()
110+
111+
Return the file descriptor for the underlying file.
112+
113+
.. versionadded:: 3.3
114+
115+
.. method:: readable()
116+
117+
Return whether the file was opened for reading.
118+
119+
.. versionadded:: 3.3
120+
121+
.. method:: seekable()
122+
123+
Return whether the file supports seeking.
124+
125+
.. versionadded:: 3.3
126+
127+
.. method:: writable()
128+
129+
Return whether the file was opened for writing.
130+
131+
.. versionadded:: 3.3
132+
133+
.. method:: read1(size=-1)
134+
135+
Read up to *size* uncompressed bytes, while trying to avoid
136+
making multiple reads from the underlying stream. Reads up to a
137+
buffer's worth of data if size is negative.
138+
139+
Returns ``b''`` if the file is at EOF.
140+
141+
.. versionadded:: 3.3
142+
143+
.. method:: readinto(b)
144+
145+
Read bytes into *b*.
146+
147+
Returns the number of bytes read (0 for EOF).
148+
149+
.. versionadded:: 3.3
150+
109151

110152
.. versionchanged:: 3.1
111153
Support for the :keyword:`with` statement was added.
112154

113-
.. versionchanged:: 3.3
114-
The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`,
115-
:meth:`read1` and :meth:`readinto` methods were added.
116-
117155
.. versionchanged:: 3.3
118156
Support was added for *filename* being a :term:`file object` instead of an
119157
actual filename.

_sources/library/enum.rst.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ Data Types
198198
>>> some_var = Color.RED
199199
>>> some_var in Color
200200
True
201+
>>> Color.RED.value in Color
202+
True
201203

202-
.. note::
204+
.. versionchanged:: 3.12
203205

204-
In Python 3.12 it will be possible to check for member values and not
205-
just members; until then, a ``TypeError`` will be raised if a
206+
Before Python 3.12, a ``TypeError`` is raised if a
206207
non-Enum-member is used in a containment check.
207208

208209
.. method:: EnumType.__dir__(cls)

_sources/library/inspect.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ function.
640640
Accepts a wide range of Python callables, from plain functions and classes to
641641
:func:`functools.partial` objects.
642642

643+
If the passed object has a ``__signature__`` attribute, this function
644+
returns it without further computations.
645+
643646
For objects defined in modules using stringized annotations
644647
(``from __future__ import annotations``), :func:`signature` will
645648
attempt to automatically un-stringize the annotations using
@@ -760,6 +763,8 @@ function.
760763
sig = MySignature.from_callable(min)
761764
assert isinstance(sig, MySignature)
762765

766+
Its behavior is otherwise identical to that of :func:`signature`.
767+
763768
.. versionadded:: 3.5
764769

765770
.. versionadded:: 3.10

_sources/library/mmap.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ the current file position, and :meth:`seek` through the file to different positi
1919
A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
2020
different on Unix and on Windows. In either case you must provide a file
2121
descriptor for a file opened for update. If you wish to map an existing Python
22-
file object, use its :meth:`fileno` method to obtain the correct value for the
22+
file object, use its :meth:`~io.IOBase.fileno` method to obtain the correct value for the
2323
*fileno* parameter. Otherwise, you can open the file using the
2424
:func:`os.open` function, which returns a file descriptor directly (the file
2525
still needs to be closed when done).

_sources/library/multiprocessing.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ multiple connections at the same time.
25712571
**Windows**: An item in *object_list* must either be an integer
25722572
handle which is waitable (according to the definition used by the
25732573
documentation of the Win32 function ``WaitForMultipleObjects()``)
2574-
or it can be an object with a :meth:`fileno` method which returns a
2574+
or it can be an object with a :meth:`~io.IOBase.fileno` method which returns a
25752575
socket handle or pipe handle. (Note that pipe handles and socket
25762576
handles are **not** waitable handles.)
25772577

_sources/library/selectors.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It defines a :class:`BaseSelector` abstract base class, along with several
2121
concrete implementations (:class:`KqueueSelector`, :class:`EpollSelector`...),
2222
that can be used to wait for I/O readiness notification on multiple file
2323
objects. In the following, "file object" refers to any object with a
24-
:meth:`fileno()` method, or a raw file descriptor. See :term:`file object`.
24+
:meth:`~io.IOBase.fileno` method, or a raw file descriptor. See :term:`file object`.
2525

2626
:class:`DefaultSelector` is an alias to the most efficient implementation
2727
available on the current platform: this should be the default choice for most

0 commit comments

Comments
 (0)