Skip to content

Commit c7bb873

Browse files
committed
Merge remote-tracking branch 'origin/3.14' into backport-010bebb-3.14
2 parents 351129f + 0068b4a commit c7bb873

23 files changed

Lines changed: 141 additions & 26 deletions

‎Doc/c-api/datetime.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the module initialisation function. The macro puts a pointer to a C structure
1313
into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following
1414
macros.
1515

16-
.. c:macro:: PyDateTime_IMPORT()
16+
.. c:macro:: PyDateTime_IMPORT
1717
1818
Import the datetime C API.
1919

‎Doc/c-api/init_config.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ Example::
831831
if (PyStatus_Exception(status)) {
832832
Py_ExitStatusException(status);
833833
}
834-
PyMem_Free(ptr);
834+
PyMem_RawFree(ptr);
835835
return 0;
836836
}
837837

‎Doc/howto/mro.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ straightforward to compute the linearizations of O, X, Y, A and B:
348348

349349
.. code-block:: text
350350
351-
L[O] = 0
351+
L[O] = O
352352
L[X] = X O
353353
L[Y] = Y O
354354
L[A] = A X Y O

‎Doc/library/email.generator.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To accommodate reproducible processing of SMIME-signed messages
6161

6262
If *maxheaderlen* is not ``None``, refold any header lines that are longer
6363
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
64-
*manheaderlen* is ``None`` (the default), wrap headers and other message
64+
*maxheaderlen* is ``None`` (the default), wrap headers and other message
6565
lines according to the *policy* settings.
6666

6767
If *policy* is specified, use that policy to control message generation. If
@@ -137,7 +137,7 @@ a serialized binary representation of a message object. For more detail, see
137137
Because strings cannot represent binary data, the :class:`Generator` class must
138138
convert any binary data in any message it flattens to an ASCII compatible
139139
format, by converting them to an ASCII compatible
140-
:mailheader:`Content-Transfer_Encoding`. Using the terminology of the email
140+
:mailheader:`Content-Transfer-Encoding`. Using the terminology of the email
141141
RFCs, you can think of this as :class:`Generator` serializing to an I/O stream
142142
that is not "8 bit clean". In other words, most applications will want
143143
to be using :class:`BytesGenerator`, and not :class:`Generator`.
@@ -162,7 +162,7 @@ to be using :class:`BytesGenerator`, and not :class:`Generator`.
162162

163163
If *maxheaderlen* is not ``None``, refold any header lines that are longer
164164
than *maxheaderlen*, or if ``0``, do not rewrap any headers. If
165-
*manheaderlen* is ``None`` (the default), wrap headers and other message
165+
*maxheaderlen* is ``None`` (the default), wrap headers and other message
166166
lines according to the *policy* settings.
167167

168168
If *policy* is specified, use that policy to control message generation. If
@@ -267,7 +267,7 @@ in with information about the part.
267267

268268
"[Non-text (%(type)s) part of message omitted, filename %(filename)s]"
269269

270-
Optional *_mangle_from_* and *maxheaderlen* are as with the
270+
Optional *mangle_from_* and *maxheaderlen* are as with the
271271
:class:`Generator` base class.
272272

273273

‎Doc/library/email.message.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ message objects.
636636
.. method:: make_mixed(boundary=None)
637637

638638
Convert a non-``multipart``, a ``multipart/related``, or a
639-
``multipart-alternative`` into a ``multipart/mixed``, moving any existing
639+
``multipart/alternative`` into a ``multipart/mixed``, moving any existing
640640
:mailheader:`Content-` headers and payload into a (new) first part of the
641641
``multipart``. If *boundary* is specified, use it as the boundary string
642642
in the multipart, otherwise leave the boundary to be automatically

‎Doc/library/email.policy.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ added matters. To illustrate::
523523
If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is
524524
converted back
525525
into bytes. Headers with binary data are not refolded, regardless of the
526-
``refold_header`` setting, since there is no way to know whether the
526+
``refold_source`` setting, since there is no way to know whether the
527527
binary data consists of single byte characters or multibyte characters.
528528

529529

‎Doc/library/mailbox.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
495495
.. method:: set_info(key, info)
496496

497497
Set the info of the message corresponding to *key* to *info*.
498-
Calling ``some_mailbox.set_info(key, flags)`` is similar to ::
498+
Calling ``some_mailbox.set_info(key, info)`` is similar to ::
499499

500500
one_message = some_mailbox.get_message(key)
501501
one_message.set_info(info)

‎Doc/library/select.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
547547
| :const:`KQ_FILTER_AIO` | AIO requests. |
548548
+---------------------------+---------------------------------------------+
549549
| :const:`KQ_FILTER_VNODE` | Returns when one or more of the requested |
550-
| | events watched in *fflag* occurs. |
550+
| | events watched in *fflags* occurs. |
551551
+---------------------------+---------------------------------------------+
552552
| :const:`KQ_FILTER_PROC` | Watch for events on a process ID. |
553553
+---------------------------+---------------------------------------------+

‎Doc/library/termios.rst‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ The module defines the following functions:
3939
well as the indexing in the *cc* array must be done using the symbolic
4040
constants defined in the :mod:`!termios` module.
4141

42+
.. data:: VMIN
43+
VTIME
44+
45+
Indices into the *cc* array controlling a non-canonical read: the minimum
46+
number of characters to read and the timeout in tenths of a second,
47+
respectively.
48+
4249

4350
.. function:: tcsetattr(fd, when, attributes)
4451

@@ -77,13 +84,28 @@ The module defines the following functions:
7784
which queue: :const:`TCIFLUSH` for the input queue, :const:`TCOFLUSH` for the
7885
output queue, or :const:`TCIOFLUSH` for both queues.
7986

87+
.. data:: TCIFLUSH
88+
TCOFLUSH
89+
TCIOFLUSH
90+
91+
Values for the *queue* selector: the input queue, the output queue, or
92+
both queues, respectively.
93+
8094

8195
.. function:: tcflow(fd, action)
8296

8397
Suspend or resume input or output on file descriptor *fd*. The *action*
8498
argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart
8599
output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input.
86100

101+
.. data:: TCOOFF
102+
TCOON
103+
TCIOFF
104+
TCION
105+
106+
Values for the *action* argument: suspend output, restart output,
107+
suspend input, or restart input, respectively.
108+
87109

88110
.. function:: tcgetwinsize(fd)
89111

@@ -93,6 +115,12 @@ The module defines the following functions:
93115

94116
.. versionadded:: 3.11
95117

118+
.. data:: TIOCGWINSZ
119+
TIOCGSIZE
120+
121+
``ioctl()`` requests for querying the tty window size. Not defined on
122+
all platforms; :func:`tcgetwinsize` requires at least one of them.
123+
96124

97125
.. function:: tcsetwinsize(fd, winsize)
98126

@@ -104,6 +132,12 @@ The module defines the following functions:
104132

105133
.. versionadded:: 3.11
106134

135+
.. data:: TIOCSWINSZ
136+
TIOCSSIZE
137+
138+
``ioctl()`` requests for setting the tty window size. Not defined on all
139+
platforms; see :func:`tcsetwinsize` for the required pairs.
140+
107141

108142
.. seealso::
109143

‎Doc/library/urllib.request.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ The :mod:`!urllib.request` module defines the following functions:
7272

7373
Raises :exc:`~urllib.error.URLError` on protocol errors.
7474

75+
Exceptions raised while reading or parsing an HTTP response are not
76+
wrapped in :exc:`~urllib.error.URLError` and propagate unchanged.
77+
These include subclasses of :exc:`http.client.HTTPException`, such as
78+
:exc:`~http.client.BadStatusLine` for a malformed status line, and
79+
subclasses of :exc:`OSError`, such as :exc:`TimeoutError` if the server
80+
does not respond within *timeout* seconds, or
81+
:exc:`~http.client.RemoteDisconnected` if the server closes the
82+
connection without sending a response. :exc:`ValueError` is raised if
83+
*url* is not a valid URL.
84+
7585
Note that ``None`` may be returned if no handler handles the request (though
7686
the default installed global :class:`OpenerDirector` uses
7787
:class:`UnknownHandler` to ensure this never happens).

0 commit comments

Comments
 (0)