Skip to content

Commit f8bc0e0

Browse files
Merge branch 'main' into pyarg-deprecate-sequences
2 parents 9878b37 + 9ba0528 commit f8bc0e0

29 files changed

+243
-178
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/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/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/whatsnew/3.14.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ Other language changes
245245
making it a :term:`generic type`.
246246
(Contributed by Brian Schubert in :gh:`126012`.)
247247

248+
* ``\B`` in :mod:`regular expression <re>` now matches empty input string.
249+
Now it is always the opposite of ``\b``.
250+
(Contributed by Serhiy Storchaka in :gh:`124130`.)
251+
248252
* iOS and macOS apps can now be configured to redirect ``stdout`` and
249253
``stderr`` content to the system log. (Contributed by Russell Keith-Magee in
250254
:gh:`127592`.)
@@ -744,6 +748,11 @@ Deprecated
744748
as a single positional argument.
745749
(Contributed by Serhiy Storchaka in :gh:`109218`.)
746750

751+
* :mod:`functools`:
752+
Calling the Python implementation of :func:`functools.reduce` with *function*
753+
or *sequence* as keyword arguments is now deprecated.
754+
(Contributed by Kirill Podoprigora in :gh:`121676`.)
755+
747756
* :mod:`os`:
748757
:term:`Soft deprecate <soft deprecated>` :func:`os.popen` and
749758
:func:`os.spawn* <os.spawnl>` functions. They should no longer be used to

Doc/whatsnew/3.3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,8 @@ API changes
11471147
| :const:`MIN_EMIN` | ``-425000000`` | ``-999999999999999999`` |
11481148
+-------------------+----------------+-------------------------+
11491149

1150-
* In the context templates (:class:`~decimal.DefaultContext`,
1151-
:class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)
1150+
* In the context templates (:const:`~decimal.DefaultContext`,
1151+
:const:`~decimal.BasicContext` and :const:`~decimal.ExtendedContext`)
11521152
the magnitude of :attr:`~decimal.Context.Emax` and
11531153
:attr:`~decimal.Context.Emin` has changed to ``999999``.
11541154

Lib/_pyrepl/simple_interact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool:
138138

139139
return False
140140

141-
while 1:
141+
while True:
142142
try:
143143
try:
144144
sys.stdout.flush()

Lib/_pyrepl/unix_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog):
786786
# only if the bps is actually needed (which I'm
787787
# betting is pretty unlkely)
788788
bps = ratedict.get(self.__svtermstate.ospeed)
789-
while 1:
789+
while True:
790790
m = prog.search(fmt)
791791
if not m:
792792
os.write(self.output_fd, fmt)

0 commit comments

Comments
 (0)