Skip to content

Commit 71b4495

Browse files
Deploy preview for PR 1226 🛫
1 parent 7637f36 commit 71b4495

585 files changed

Lines changed: 717 additions & 626 deletions

File tree

Some content is hidden

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

pr-preview/pr-1226/_sources/library/calendar.rst.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,14 @@ The :mod:`!calendar` module defines the following exceptions:
544544

545545
.. exception:: IllegalMonthError(month)
546546

547-
A subclass of :exc:`ValueError`,
547+
A subclass of :exc:`ValueError` and :exc:`IndexError`,
548548
raised when the given month number is outside of the range 1-12 (inclusive).
549549

550+
.. versionchanged:: 3.12
551+
:exc:`IllegalMonthError` is now also a subclass of
552+
:exc:`ValueError`. New code should avoid catching
553+
:exc:`IndexError`.
554+
550555
.. attribute:: month
551556

552557
The invalid month number.

pr-preview/pr-1226/_sources/library/html.parser.rst.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ implementations do nothing (except for :meth:`~HTMLParser.handle_startendtag`):
141141
argument is a list of ``(name, value)`` pairs containing the attributes found
142142
inside the tag's ``<>`` brackets. The *name* will be translated to lower case,
143143
and quotes in the *value* have been removed, and character and entity references
144-
have been replaced.
144+
have been replaced. For empty attributes, *value* is ``None``.
145145

146146
For instance, for the tag ``<A HREF="https://www.cwi.nl/">``, this method
147147
would be called as ``handle_starttag('a', [('href', 'https://www.cwi.nl/')])``.
@@ -317,6 +317,18 @@ without further parsing:
317317
Data : alert("<strong>hello! &#9786;</strong>");
318318
End tag : script
319319

320+
Attribute names are converted to lowercase, quotes from attribute values removed,
321+
and ``None`` is returned as *value* for empty attributes (such as ``checked``):
322+
323+
.. doctest::
324+
325+
>>> parser.feed("<input TYPE='checkbox' checked required='' disabled=disabled>")
326+
Start tag: input
327+
attr: ('type', 'checkbox')
328+
attr: ('checked', None)
329+
attr: ('required', '')
330+
attr: ('disabled', 'disabled')
331+
320332
Parsing comments:
321333

322334
.. doctest::

pr-preview/pr-1226/_sources/library/multiprocessing.rst.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,6 +2907,16 @@ between themselves.
29072907

29082908
Suitable authentication keys can also be generated by using :func:`os.urandom`.
29092909

2910+
This authentication protects :class:`Listener` and :func:`Client` connections,
2911+
which are reachable by address. It is not applied to the anonymous pipes
2912+
created by :func:`~multiprocessing.Pipe` or used internally by
2913+
:class:`~multiprocessing.Queue`.
2914+
:mod:`multiprocessing` treats all local processes running as the same user as
2915+
trusted; on most operating systems such processes can access each other's pipe
2916+
file descriptors regardless. Applications that require isolation between
2917+
processes of the same user must arrange it at the operating-system level --
2918+
for example, by running workers under a different user account or in a sandbox.
2919+
29102920

29112921
Logging
29122922
^^^^^^^

pr-preview/pr-1226/_sources/library/struct.rst.txt

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -227,32 +227,32 @@ platform-dependent.
227227
+--------+--------------------------+--------------------+----------------+------------+
228228
| ``c`` | :c:expr:`char` | bytes of length 1 | 1 | |
229229
+--------+--------------------------+--------------------+----------------+------------+
230-
| ``b`` | :c:expr:`signed char` | integer | 1 | \(1), \(2) |
230+
| ``b`` | :c:expr:`signed char` | int | 1 | \(2) |
231231
+--------+--------------------------+--------------------+----------------+------------+
232-
| ``B`` | :c:expr:`unsigned char` | integer | 1 | \(2) |
232+
| ``B`` | :c:expr:`unsigned char` | int | 1 | \(2) |
233233
+--------+--------------------------+--------------------+----------------+------------+
234234
| ``?`` | :c:expr:`_Bool` | bool | 1 | \(1) |
235235
+--------+--------------------------+--------------------+----------------+------------+
236-
| ``h`` | :c:expr:`short` | integer | 2 | \(2) |
236+
| ``h`` | :c:expr:`short` | int | 2 | \(2) |
237237
+--------+--------------------------+--------------------+----------------+------------+
238-
| ``H`` | :c:expr:`unsigned short` | integer | 2 | \(2) |
238+
| ``H`` | :c:expr:`unsigned short` | int | 2 | \(2) |
239239
+--------+--------------------------+--------------------+----------------+------------+
240-
| ``i`` | :c:expr:`int` | integer | 4 | \(2) |
240+
| ``i`` | :c:expr:`int` | int | 4 | \(2) |
241241
+--------+--------------------------+--------------------+----------------+------------+
242-
| ``I`` | :c:expr:`unsigned int` | integer | 4 | \(2) |
242+
| ``I`` | :c:expr:`unsigned int` | int | 4 | \(2) |
243243
+--------+--------------------------+--------------------+----------------+------------+
244-
| ``l`` | :c:expr:`long` | integer | 4 | \(2) |
244+
| ``l`` | :c:expr:`long` | int | 4 | \(2) |
245245
+--------+--------------------------+--------------------+----------------+------------+
246-
| ``L`` | :c:expr:`unsigned long` | integer | 4 | \(2) |
246+
| ``L`` | :c:expr:`unsigned long` | int | 4 | \(2) |
247247
+--------+--------------------------+--------------------+----------------+------------+
248-
| ``q`` | :c:expr:`long long` | integer | 8 | \(2) |
248+
| ``q`` | :c:expr:`long long` | int | 8 | \(2) |
249249
+--------+--------------------------+--------------------+----------------+------------+
250-
| ``Q`` | :c:expr:`unsigned long | integer | 8 | \(2) |
250+
| ``Q`` | :c:expr:`unsigned long | int | 8 | \(2) |
251251
| | long` | | | |
252252
+--------+--------------------------+--------------------+----------------+------------+
253-
| ``n`` | :c:type:`ssize_t` | integer | | \(3) |
253+
| ``n`` | :c:type:`ssize_t` | int | | \(2), \(3) |
254254
+--------+--------------------------+--------------------+----------------+------------+
255-
| ``N`` | :c:type:`size_t` | integer | | \(3) |
255+
| ``N`` | :c:type:`size_t` | int | | \(2), \(3) |
256256
+--------+--------------------------+--------------------+----------------+------------+
257257
| ``e`` | :c:expr:`_Float16` | float | 2 | \(4), \(6) |
258258
+--------+--------------------------+--------------------+----------------+------------+
@@ -268,7 +268,7 @@ platform-dependent.
268268
+--------+--------------------------+--------------------+----------------+------------+
269269
| ``p`` | :c:expr:`char[]` | bytes | | \(8) |
270270
+--------+--------------------------+--------------------+----------------+------------+
271-
| ``P`` | :c:expr:`void \*` | integer | | \(5) |
271+
| ``P`` | :c:expr:`void \*` | int | | \(2), \(5) |
272272
+--------+--------------------------+--------------------+----------------+------------+
273273

274274
.. versionchanged:: 3.3
@@ -342,27 +342,31 @@ Notes:
342342
The ``'p'`` format character encodes a "Pascal string", meaning a short
343343
variable-length string stored in a *fixed number of bytes*, given by the count.
344344
The first byte stored is the length of the string, or 255, whichever is
345-
smaller. The bytes of the string follow. If the string passed in to
345+
smaller. The bytes of the string follow. If the byte string passed in to
346346
:func:`pack` is too long (longer than the count minus 1), only the leading
347-
``count-1`` bytes of the string are stored. If the string is shorter than
347+
``count-1`` bytes of the string are stored. If the byte string is shorter than
348348
``count-1``, it is padded with null bytes so that exactly count bytes in all
349349
are used. Note that for :func:`unpack`, the ``'p'`` format character consumes
350-
``count`` bytes, but that the string returned can never contain more than 255
350+
``count`` bytes, but that the :class:`!bytes` object returned can never contain more than 255
351351
bytes.
352+
When packing, arguments of types :class:`bytes` and :class:`bytearray`
353+
are accepted.
352354

353355
(9)
354356
For the ``'s'`` format character, the count is interpreted as the length of the
355-
bytes, not a repeat count like for the other format characters; for example,
357+
byte string, not a repeat count like for the other format characters; for example,
356358
``'10s'`` means a single 10-byte string mapping to or from a single
357359
Python byte string, while ``'10c'`` means 10
358360
separate one byte character elements (e.g., ``cccccccccc``) mapping
359361
to or from ten different Python byte objects. (See :ref:`struct-examples`
360362
for a concrete demonstration of the difference.)
361-
If a count is not given, it defaults to 1. For packing, the string is
363+
If a count is not given, it defaults to 1. For packing, the byte string is
362364
truncated or padded with null bytes as appropriate to make it fit. For
363-
unpacking, the resulting bytes object always has exactly the specified number
364-
of bytes. As a special case, ``'0s'`` means a single, empty string (while
365+
unpacking, the resulting :class:`!bytes` object always has exactly the specified number
366+
of bytes. As a special case, ``'0s'`` means a single, empty byte string (while
365367
``'0c'`` means 0 characters).
368+
When packing, arguments of types :class:`bytes` and :class:`bytearray`
369+
are accepted.
366370

367371
(10)
368372
For the ``'F'`` and ``'D'`` format characters, the packed representation uses

pr-preview/pr-1226/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 4月 27, 2026 (00:34 UTC)。
359+
最後更新於 4月 28, 2026 (00:37 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1226/bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
250250
</section>
251251
<section id="getting-started-contributing-to-python-yourself">
252252
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
253-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
253+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
254254
</section>
255255
</section>
256256

@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 4月 27, 2026 (00:34 UTC)。
396+
最後更新於 4月 28, 2026 (00:37 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1226/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 4月 27, 2026 (00:34 UTC)。
368+
最後更新於 4月 28, 2026 (00:37 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1226/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ <h3>導航</h3>
577577
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
578578
<br>
579579
<br>
580-
最後更新於 4月 27, 2026 (00:34 UTC)。
580+
最後更新於 4月 28, 2026 (00:37 UTC)。
581581

582582
<a href="/bugs.html">發現 bug</a>
583583

pr-preview/pr-1226/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 4月 27, 2026 (00:34 UTC)。
517+
最後更新於 4月 28, 2026 (00:37 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

pr-preview/pr-1226/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ <h3>導航</h3>
996996
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
997997
<br>
998998
<br>
999-
最後更新於 4月 27, 2026 (00:34 UTC)。
999+
最後更新於 4月 28, 2026 (00:37 UTC)。
10001000

10011001
<a href="/bugs.html">發現 bug</a>
10021002

0 commit comments

Comments
 (0)