Skip to content

Commit 9bc4065

Browse files
Deploy preview for PR 1193 🛫
1 parent e6d24cd commit 9bc4065

File tree

576 files changed

+640
-602
lines changed

Some content is hidden

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

576 files changed

+640
-602
lines changed

pr-preview/pr-1193/_sources/library/asyncio-task.rst.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,9 @@ Timeouts
771771
An :ref:`asynchronous context manager <async-context-managers>`
772772
for cancelling overdue coroutines.
773773

774+
Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at`
775+
rather than instantiating :class:`!Timeout` directly.
776+
774777
``when`` should be an absolute time at which the context should time out,
775778
as measured by the event loop's clock:
776779

pr-preview/pr-1193/_sources/library/pathlib.rst.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,10 @@ Pure paths provide the following methods and properties:
486486
>>> PurePosixPath('my/library').stem
487487
'library'
488488

489+
.. versionchanged:: 3.14
490+
491+
A single dot ("``.``") is considered a valid suffix.
492+
489493

490494
.. method:: PurePath.as_posix()
491495

pr-preview/pr-1193/_sources/library/secrets.rst.txt

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,39 +62,44 @@ The :mod:`!secrets` module provides functions for generating secure
6262
tokens, suitable for applications such as password resets,
6363
hard-to-guess URLs, and similar.
6464

65-
.. function:: token_bytes([nbytes=None])
65+
.. function:: token_bytes(nbytes=None)
6666

6767
Return a random byte string containing *nbytes* number of bytes.
68-
If *nbytes* is ``None`` or not supplied, a reasonable default is
69-
used.
68+
69+
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
70+
is used instead.
7071

7172
.. doctest::
7273

73-
>>> token_bytes(16) #doctest:+SKIP
74+
>>> token_bytes(16) # doctest: +SKIP
7475
b'\xebr\x17D*t\xae\xd4\xe3S\xb6\xe2\xebP1\x8b'
7576

7677

77-
.. function:: token_hex([nbytes=None])
78+
.. function:: token_hex(nbytes=None)
7879

7980
Return a random text string, in hexadecimal. The string has *nbytes*
80-
random bytes, each byte converted to two hex digits. If *nbytes* is
81-
``None`` or not supplied, a reasonable default is used.
81+
random bytes, each byte converted to two hex digits.
82+
83+
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
84+
is used instead.
8285

8386
.. doctest::
8487

85-
>>> token_hex(16) #doctest:+SKIP
88+
>>> token_hex(16) # doctest: +SKIP
8689
'f9bf78b9a18ce6d46a0cd2b0b86df9da'
8790

88-
.. function:: token_urlsafe([nbytes=None])
91+
.. function:: token_urlsafe(nbytes=None)
8992

9093
Return a random URL-safe text string, containing *nbytes* random
9194
bytes. The text is Base64 encoded, so on average each byte results
92-
in approximately 1.3 characters. If *nbytes* is ``None`` or not
93-
supplied, a reasonable default is used.
95+
in approximately 1.3 characters.
96+
97+
If *nbytes* is not specified or ``None``, :const:`DEFAULT_ENTROPY`
98+
is used instead.
9499

95100
.. doctest::
96101

97-
>>> token_urlsafe(16) #doctest:+SKIP
102+
>>> token_urlsafe(16) # doctest: +SKIP
98103
'Drmhze6EPcv0fN_81Bj-nA'
99104

100105

@@ -115,11 +120,13 @@ argument to the various ``token_*`` functions. That argument is taken
115120
as the number of bytes of randomness to use.
116121

117122
Otherwise, if no argument is provided, or if the argument is ``None``,
118-
the ``token_*`` functions will use a reasonable default instead.
123+
the ``token_*`` functions uses :const:`DEFAULT_ENTROPY` instead.
119124

120-
.. note::
125+
.. data:: DEFAULT_ENTROPY
126+
127+
Default number of bytes of randomness used by the ``token_*`` functions.
121128

122-
That default is subject to change at any time, including during
129+
The exact value is subject to change at any time, including during
123130
maintenance releases.
124131

125132

pr-preview/pr-1193/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ <h3>導航</h3>
326326
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
327327
<br>
328328
<br>
329-
最後更新於 2月 07, 2026 (00:25 UTC)。
329+
最後更新於 2月 08, 2026 (00:31 UTC)。
330330

331331
<a href="/bugs.html">發現 bug</a>
332332

pr-preview/pr-1193/bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
235235
</section>
236236
<section id="getting-started-contributing-to-python-yourself">
237237
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
238-
<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>
238+
<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>
239239
</section>
240240
</section>
241241

@@ -363,7 +363,7 @@ <h3>導航</h3>
363363
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
364364
<br>
365365
<br>
366-
最後更新於 2月 07, 2026 (00:25 UTC)。
366+
最後更新於 2月 08, 2026 (00:31 UTC)。
367367

368368
<a href="/bugs.html">發現 bug</a>
369369

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ <h3>導航</h3>
335335
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
336336
<br>
337337
<br>
338-
最後更新於 2月 07, 2026 (00:25 UTC)。
338+
最後更新於 2月 08, 2026 (00:31 UTC)。
339339

340340
<a href="/bugs.html">發現 bug</a>
341341

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ <h3>導航</h3>
544544
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
545545
<br>
546546
<br>
547-
最後更新於 2月 07, 2026 (00:25 UTC)。
547+
最後更新於 2月 08, 2026 (00:31 UTC)。
548548

549549
<a href="/bugs.html">發現 bug</a>
550550

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ <h3>導航</h3>
484484
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
485485
<br>
486486
<br>
487-
最後更新於 2月 07, 2026 (00:25 UTC)。
487+
最後更新於 2月 08, 2026 (00:31 UTC)。
488488

489489
<a href="/bugs.html">發現 bug</a>
490490

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ <h3>導航</h3>
966966
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
967967
<br>
968968
<br>
969-
最後更新於 2月 07, 2026 (00:25 UTC)。
969+
最後更新於 2月 08, 2026 (00:31 UTC)。
970970

971971
<a href="/bugs.html">發現 bug</a>
972972

pr-preview/pr-1193/c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ <h3>導航</h3>
346346
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
347347
<br>
348348
<br>
349-
最後更新於 2月 07, 2026 (00:25 UTC)。
349+
最後更新於 2月 08, 2026 (00:31 UTC)。
350350

351351
<a href="/bugs.html">發現 bug</a>
352352

0 commit comments

Comments
 (0)