Skip to content

Commit 88d7546

Browse files
authored
Merge branch 'main' into add-eager-start-to-create-task
2 parents 9635a94 + 8eebe4e commit 88d7546

File tree

69 files changed

+1122
-846
lines changed

Some content is hidden

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

69 files changed

+1122
-846
lines changed

Doc/about.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
=====================
2-
About these documents
3-
=====================
1+
========================
2+
About this documentation
3+
========================
44

55

6-
These documents are generated from `reStructuredText`_ sources by `Sphinx`_, a
7-
document processor specifically written for the Python documentation.
6+
Python's documentation is generated from `reStructuredText`_ sources
7+
using `Sphinx`_, a documentation generator originally created for Python
8+
and now maintained as an independent project.
89

910
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
1011
.. _Sphinx: https://www.sphinx-doc.org/
@@ -20,14 +21,14 @@ volunteers are always welcome!
2021
Many thanks go to:
2122

2223
* Fred L. Drake, Jr., the creator of the original Python documentation toolset
23-
and writer of much of the content;
24+
and author of much of the content;
2425
* the `Docutils <https://docutils.sourceforge.io/>`_ project for creating
2526
reStructuredText and the Docutils suite;
2627
* Fredrik Lundh for his Alternative Python Reference project from which Sphinx
2728
got many good ideas.
2829

2930

30-
Contributors to the Python Documentation
31+
Contributors to the Python documentation
3132
----------------------------------------
3233

3334
Many people have contributed to the Python language, the Python standard

Doc/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@
101101

102102
# Create table of contents entries for domain objects (e.g. functions, classes,
103103
# attributes, etc.). Default is True.
104-
toc_object_entries = True
105-
# Hide parents to tidy up long entries in sidebar
106-
toc_object_entries_show_parents = 'hide'
104+
toc_object_entries = False
107105

108106
# Ignore any .rst files in the includes/ directory;
109107
# they're embedded in pages but not rendered as individual pages.

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,8 @@ Pending removal in Python 3.16
7979

8080
* The undocumented and unused :attr:`!TarFile.tarfile` attribute
8181
has been deprecated since Python 3.13.
82+
83+
* :mod:`functools`:
84+
85+
* Calling the Python implementation of :func:`functools.reduce` with *function*
86+
or *sequence* as keyword arguments has been deprecated since Python 3.14.

Doc/library/calendar.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
138138

139139
:class:`TextCalendar` instances have the following methods:
140140

141+
.. method:: formatweek(theweek, w=0)
142+
143+
Return a single week in a string with no newline. If *w* is provided, it
144+
specifies the width of the date columns, which are centered. Depends
145+
on the first weekday as specified in the constructor or set by the
146+
:meth:`setfirstweekday` method.
147+
148+
141149
.. method:: formatmonth(theyear, themonth, w=0, l=0)
142150

143151
Return a month's calendar in a multi-line string. If *w* is provided, it

Doc/library/decimal.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ New contexts can also be created using the :class:`Context` constructor
10331033
described below. In addition, the module provides three pre-made contexts:
10341034

10351035

1036-
.. class:: BasicContext
1036+
.. data:: BasicContext
10371037

10381038
This is a standard context defined by the General Decimal Arithmetic
10391039
Specification. Precision is set to nine. Rounding is set to
@@ -1044,7 +1044,7 @@ described below. In addition, the module provides three pre-made contexts:
10441044
Because many of the traps are enabled, this context is useful for debugging.
10451045

10461046

1047-
.. class:: ExtendedContext
1047+
.. data:: ExtendedContext
10481048

10491049
This is a standard context defined by the General Decimal Arithmetic
10501050
Specification. Precision is set to nine. Rounding is set to
@@ -1057,7 +1057,7 @@ described below. In addition, the module provides three pre-made contexts:
10571057
presence of conditions that would otherwise halt the program.
10581058

10591059

1060-
.. class:: DefaultContext
1060+
.. data:: DefaultContext
10611061

10621062
This context is used by the :class:`Context` constructor as a prototype for new
10631063
contexts. Changing a field (such a precision) has the effect of changing the

Doc/library/pyexpat.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ The ``errors`` module has the following attributes:
941941
has been breached.
942942

943943

944+
.. data:: XML_ERROR_NOT_STARTED
945+
946+
The parser was tried to be stopped or suspended before it started.
947+
948+
.. versionadded:: next
949+
950+
944951
.. rubric:: Footnotes
945952

946953
.. [1] The encoding string included in XML output should conform to the

Doc/library/re.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,8 @@ character ``'$'``.
572572
Word boundaries are determined by the current locale
573573
if the :py:const:`~re.LOCALE` flag is used.
574574

575-
.. note::
576-
577-
Note that ``\B`` does not match an empty string, which differs from
578-
RE implementations in other programming languages such as Perl.
579-
This behavior is kept for compatibility reasons.
575+
.. versionchanged:: next
576+
``\B`` now matches empty input string.
580577

581578
.. index:: single: \d; in regular expressions
582579

Doc/library/turtle.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,8 @@ Window control
18231823

18241824
.. function:: bgpic(picname=None)
18251825

1826-
:param picname: a string, name of a gif-file or ``"nopic"``, or ``None``
1826+
:param picname: a string, name of an image file (PNG, GIF, PGM, and PPM)
1827+
or ``"nopic"``, or ``None``
18271828

18281829
Set background image or return name of current backgroundimage. If *picname*
18291830
is a filename, set the corresponding image as background. If *picname* is
@@ -2200,9 +2201,9 @@ Settings and special methods
22002201
.. function:: register_shape(name, shape=None)
22012202
addshape(name, shape=None)
22022203

2203-
There are three different ways to call this function:
2204+
There are four different ways to call this function:
22042205

2205-
(1) *name* is the name of a gif-file and *shape* is ``None``: Install the
2206+
(1) *name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is ``None``: Install the
22062207
corresponding image shape. ::
22072208

22082209
>>> screen.register_shape("turtle.gif")
@@ -2211,20 +2212,33 @@ Settings and special methods
22112212
Image shapes *do not* rotate when turning the turtle, so they do not
22122213
display the heading of the turtle!
22132214

2214-
(2) *name* is an arbitrary string and *shape* is a tuple of pairs of
2215+
(2) *name* is an arbitrary string and *shape* is the name of an image file (PNG, GIF, PGM, and PPM): Install the
2216+
corresponding image shape. ::
2217+
2218+
>>> screen.register_shape("turtle", "turtle.gif")
2219+
2220+
.. note::
2221+
Image shapes *do not* rotate when turning the turtle, so they do not
2222+
display the heading of the turtle!
2223+
2224+
(3) *name* is an arbitrary string and *shape* is a tuple of pairs of
22152225
coordinates: Install the corresponding polygon shape.
22162226

22172227
.. doctest::
22182228
:skipif: _tkinter is None
22192229

22202230
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
22212231

2222-
(3) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape`
2232+
(4) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape`
22232233
object: Install the corresponding compound shape.
22242234

22252235
Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
22262236
shapes can be used by issuing the command ``shape(shapename)``.
22272237

2238+
.. versionchanged:: next
2239+
Added support for PNG, PGM, and PPM image formats.
2240+
Both a shape name and an image file name can be specified.
2241+
22282242

22292243
.. function:: turtles()
22302244

Doc/library/zipfile.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ The module defines the following items:
8484
formerly protected :attr:`!_compresslevel`. The older protected name
8585
continues to work as a property for backwards compatibility.
8686

87+
88+
.. method:: _for_archive(archive)
89+
90+
Resolve the date_time, compression attributes, and external attributes
91+
to suitable defaults as used by :meth:`ZipFile.writestr`.
92+
93+
Returns self for chaining.
94+
95+
.. versionadded:: 3.14
96+
97+
8798
.. function:: is_zipfile(filename)
8899

89100
Returns ``True`` if *filename* is a valid ZIP file based on its magic number,

Doc/tools/extensions/pyspecific.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,5 @@ def setup(app):
434434
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
435435
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
436436
app.add_directive('miscnews', MiscNews)
437-
app.add_css_file('sidebar-wrap.css')
438437
app.connect('env-check-consistency', patch_pairindextypes)
439438
return {'version': '1.0', 'parallel_read_safe': True}

0 commit comments

Comments
 (0)