Skip to content

Commit 7f12b8a

Browse files
Deploy preview for PR 1231 🛫
1 parent 1511729 commit 7f12b8a

589 files changed

Lines changed: 682 additions & 655 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-1231/_sources/library/asyncio-queue.rst.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Queue
7171
Return an item if one is immediately available, else raise
7272
:exc:`QueueEmpty`.
7373

74+
Raises :exc:`QueueShutDown` if the queue has been shut down and is empty.
75+
7476
.. method:: join()
7577
:async:
7678

@@ -96,6 +98,8 @@ Queue
9698

9799
If no free slot is immediately available, raise :exc:`QueueFull`.
98100

101+
Raises :exc:`QueueShutDown` if the queue has been shut down.
102+
99103
.. method:: qsize()
100104

101105
Return the number of items in the queue.
@@ -188,8 +192,9 @@ Exceptions
188192

189193
.. exception:: QueueShutDown
190194

191-
Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is
192-
called on a queue which has been shut down.
195+
Exception raised when :meth:`~Queue.put`, :meth:`~Queue.put_nowait`,
196+
:meth:`~Queue.get` or :meth:`~Queue.get_nowait` is called
197+
on a queue which has been shut down.
193198

194199
.. versionadded:: 3.13
195200

pr-preview/pr-1231/_sources/library/dialog.rst.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,16 @@ specific value.
175175

176176
.. class:: Open(master=None, **options)
177177
SaveAs(master=None, **options)
178+
Directory(master=None, **options)
178179
179-
The above two classes provide native dialog windows for saving and loading
180-
files.
180+
The above three classes provide native dialog windows for loading and saving
181+
files and for selecting a directory.
181182

182183
**Convenience classes**
183184

184185
The below classes are used for creating file/directory windows from scratch.
185186
These do not emulate the native look-and-feel of the platform.
186187

187-
.. class:: Directory(master=None, **options)
188-
189-
Create a dialog prompting the user to select a directory.
190-
191188
.. note:: The *FileDialog* class should be subclassed for custom event
192189
handling and behaviour.
193190

@@ -311,23 +308,25 @@ the classic (non-themed) Tk widgets.
311308

312309
.. data:: DIALOG_ICON
313310

314-
The name of the default bitmap (``'questhead'``) displayed by a
315-
:class:`Dialog`.
311+
The name of a bitmap (``'questhead'``) suitable for use as the *bitmap*
312+
of a :class:`Dialog`.
316313

317314
.. class:: Dialog(master=None, cnf={}, **kw)
318315

319316
Display a modal dialog box built from the classic (non-themed) Tk widgets
320317
and wait for the user to press one of its buttons.
321-
The options, given through *cnf* or as keyword arguments, include *title*
322-
(the window title), *text* (the message), *bitmap* (an icon,
323-
:data:`DIALOG_ICON` by default), *default* (the index of the default button)
324-
and *strings* (the sequence of button labels).
318+
The options, given through *cnf* or as keyword arguments, are all required:
319+
*title* (the window title), *text* (the message), *bitmap* (the name of a
320+
bitmap icon, such as :data:`DIALOG_ICON`), *default* (the index of the
321+
default button) and *strings* (the sequence of button labels).
325322
After construction, the :attr:`!num` attribute holds the index of the button
326323
the user pressed.
327324

328325
.. method:: destroy()
329326

330-
Destroy the dialog window.
327+
Do nothing.
328+
The dialog window is destroyed automatically before the constructor
329+
returns, so there is nothing left for this method to do.
331330

332331

333332
.. seealso::

pr-preview/pr-1231/_sources/library/tkinter.messagebox.rst.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ a variety of convenience methods for commonly used configurations.
1313
The message boxes are modal: each blocks until the user responds, then returns
1414
a value that depends on the function.
1515
The ``show*`` functions and :meth:`Message.show` return the symbolic name of
16-
the button the user pressed, as a string (such as :data:`OK` or :data:`YES`),
17-
while the ``ask*`` functions return a :class:`bool` or ``None`` (see each
18-
function below).
16+
the button the user pressed, as a string (such as :data:`OK` or :data:`YES`).
1917
Common message box styles and layouts include but are not limited to:
2018

2119
.. figure:: tk_msg.png

pr-preview/pr-1231/_sources/library/tkinter.rst.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,8 @@ arguments, or by calling the :meth:`~Misc.keys` method on that widget.
541541
The return value of these calls is a dictionary whose key is the name of the
542542
option as a string (for example, ``'relief'``) and whose values are 5-tuples.
543543

544-
Some options, like ``bg`` are synonyms for common options with long names
545-
(``bg`` is shorthand for "background"). Passing the ``config()`` method the name
546-
of a shorthand option will return a 2-tuple, not 5-tuple. The 2-tuple passed
547-
back will contain the name of the synonym and the "real" option (such as
548-
``('bg', 'background')``).
544+
Some options, like ``bg``, are synonyms for common options with long names
545+
(``bg`` is shorthand for "background").
549546

550547
+-------+---------------------------------+--------------+
551548
| Index | Meaning | Example |
@@ -2254,8 +2251,8 @@ Base and mixin classes
22542251
If all four arguments are given, the window manager keeps the ratio
22552252
between ``minNumer/minDenom`` and ``maxNumer/maxDenom``; passing empty
22562253
strings removes any existing restriction.
2257-
With no arguments, return a tuple of the four current values, or an empty
2258-
string if no aspect restriction is in effect.
2254+
With no arguments, return a tuple of the four current values, or ``None``
2255+
if no aspect restriction is in effect.
22592256
:meth:`wm_aspect` is an alias of :meth:`!aspect`.
22602257

22612258
.. method:: wm_attributes(*args, return_python_dict=False, **kwargs)
@@ -2480,8 +2477,8 @@ Base and mixin classes
24802477
window's internally requested size, and *widthInc* and *heightInc* are
24812478
the pixel sizes of a horizontal and vertical grid unit.
24822479
Empty strings turn off gridded management.
2483-
With no arguments, return a tuple of the four current values, or an empty
2484-
string if the window is not gridded.
2480+
With no arguments, return a tuple of the four current values, or ``None``
2481+
if the window is not gridded.
24852482
:meth:`wm_grid` is an alias of :meth:`!grid`.
24862483

24872484
Not to be confused with the grid geometry manager :meth:`Grid.grid`.
@@ -2576,8 +2573,8 @@ Base and mixin classes
25762573
Set or query a hint to the window manager about where the window's icon
25772574
should be positioned.
25782575
Empty strings cancel an existing hint.
2579-
With no arguments, return a tuple of the two current values, or an empty
2580-
string if no hint is in effect.
2576+
With no arguments, return a tuple of the two current values, or ``None``
2577+
if no hint is in effect.
25812578
:meth:`wm_iconposition` is an alias of :meth:`!iconposition`.
25822579

25832580
.. method:: wm_iconwindow(pathName=None)
@@ -2646,7 +2643,8 @@ Base and mixin classes
26462643
When this flag is set, the window is ignored by the window manager: it is
26472644
not reparented into a decorative frame and the user cannot manipulate it
26482645
through the usual window manager controls.
2649-
With no argument, return a boolean indicating whether the flag is set.
2646+
With no argument, return a boolean indicating whether the flag is set,
2647+
or ``None`` if it has not been set.
26502648
The flag is reliably honored only when the window is first mapped or
26512649
remapped from the withdrawn state.
26522650
:meth:`wm_overrideredirect` is an alias of :meth:`!overrideredirect`.

pr-preview/pr-1231/_sources/library/tkinter.ttk.rst.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ To override the basic Tk widgets, the import should follow the Tk import::
4444

4545
That code causes several :mod:`!tkinter.ttk` widgets (:class:`Button`,
4646
:class:`Checkbutton`, :class:`Entry`, :class:`Frame`, :class:`Label`,
47-
:class:`LabelFrame`, :class:`Menubutton`, :class:`PanedWindow`,
48-
:class:`Radiobutton`, :class:`Scale` and :class:`Scrollbar`) to
47+
:class:`LabelFrame`, :class:`Menubutton`, :class:`OptionMenu`,
48+
:class:`PanedWindow`, :class:`Radiobutton`, :class:`Scale`,
49+
:class:`Scrollbar` and :class:`Spinbox`) to
4950
automatically replace the Tk widgets.
5051

5152
This has the direct benefit of using the new widgets which gives a better look
@@ -885,8 +886,8 @@ This widget accepts the following specific options:
885886
The *selectmode* option gained the values ``"single"`` and ``"multiple"``;
886887
the new widget options *selecttype* (``"item"`` or ``"cell"`` selection),
887888
*striped* (zebra-striped rows), and *titlecolumns* / *titleitems* (columns
888-
or rows frozen against scrolling) were introduced; and items gained a
889-
*hidden* option.
889+
or rows frozen against scrolling) were introduced; the column *separator*
890+
option was added; and items gained a *hidden* option.
890891
Tk 9.1 added the *rowheight* and *headingheight* options.
891892

892893

@@ -1041,6 +1042,9 @@ ttk.Treeview
10411042
The minimum width of the column in pixels. The treeview widget will
10421043
not make the column any smaller than specified by this option when
10431044
the widget is resized or the user drags a column.
1045+
*separator*: ``True``/``False``
1046+
Specifies whether a column separator should be drawn to the right of
1047+
the column.
10441048
*stretch*: ``True``/``False``
10451049
Specifies whether the column's width should be adjusted when
10461050
the widget is resized.
@@ -1754,8 +1758,11 @@ and inherits the common methods of :class:`Widget`.
17541758
display in the menu.
17551759
A *command* keyword argument may be given to specify a callable that is
17561760
invoked with the selected value whenever the selection changes; the *style*
1757-
keyword argument sets the style used by the underlying menubutton; and the
1758-
*name* keyword argument sets the Tk widget name.
1761+
keyword argument sets the style used by the underlying menubutton; the
1762+
*direction* keyword argument sets where the menu is posted relative to the
1763+
menubutton (one of ``'above'``, ``'below'`` (the default), ``'left'``,
1764+
``'right'`` or ``'flush'``); and the *name* keyword argument sets the Tk
1765+
widget name.
17591766

17601767
.. method:: set_menu(default=None, *values)
17611768

pr-preview/pr-1231/_sources/library/urllib.request.rst.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,8 @@ some point in the future.
14901490
.. function:: urlcleanup()
14911491

14921492
Cleans up temporary files that may have been left behind by previous
1493-
calls to :func:`urlretrieve`.
1493+
calls to :func:`urlretrieve`. It also resets the default global opener
1494+
installed by :func:`install_opener`.
14941495

14951496

14961497
:mod:`!urllib.request` Restrictions

pr-preview/pr-1231/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-
最後更新於 7月 11, 2026 (00:33 UTC)。
359+
最後更新於 7月 12, 2026 (00:35 UTC)。
360360

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

pr-preview/pr-1231/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-
最後更新於 7月 11, 2026 (00:33 UTC)。
396+
最後更新於 7月 12, 2026 (00:35 UTC)。
397397

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

pr-preview/pr-1231/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-
最後更新於 7月 11, 2026 (00:33 UTC)。
368+
最後更新於 7月 12, 2026 (00:35 UTC)。
369369

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

pr-preview/pr-1231/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-
最後更新於 7月 11, 2026 (00:33 UTC)。
580+
最後更新於 7月 12, 2026 (00:35 UTC)。
581581

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

0 commit comments

Comments
 (0)