Skip to content

Commit d13b9a3

Browse files
authored
Merge branch 'main' into narrowing-to-constants-in-branches-with-is
2 parents b6c4019 + 6181b69 commit d13b9a3

File tree

91 files changed

+3958
-1767
lines changed

Some content is hidden

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

91 files changed

+3958
-1767
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ Tools/wasm/config.site-wasm32-emscripten @freakboy3742 @emmatyping
176176
Tools/wasm/emscripten @freakboy3742 @emmatyping
177177

178178
# WebAssembly (WASI)
179+
Platforms/WASI @brettcannon @emmatyping @savannahostrowski
179180
Tools/wasm/wasi-env @brettcannon @emmatyping @savannahostrowski
180181
Tools/wasm/wasi.py @brettcannon @emmatyping @savannahostrowski
181182
Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
262262
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
263263
# supported by important vendors such as AWS-LC.
264-
openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
264+
openssl_ver: [1.1.1w, 3.0.18, 3.3.5, 3.4.3, 3.5.4, 3.6.0]
265265
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
266266
env:
267267
OPENSSL_VER: ${{ matrix.openssl_ver }}

.github/workflows/reusable-wasi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ jobs:
4747
- name: "Runner image version"
4848
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
4949
- name: "Configure build Python"
50-
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
50+
run: python3 Platforms/WASI configure-build-python -- --config-cache --with-pydebug
5151
- name: "Make build Python"
52-
run: python3 Tools/wasm/wasi make-build-python
52+
run: python3 Platforms/WASI make-build-python
5353
- name: "Configure host"
5454
# `--with-pydebug` inferred from configure-build-python
55-
run: python3 Tools/wasm/wasi configure-host -- --config-cache
55+
run: python3 Platforms/WASI configure-host -- --config-cache
5656
- name: "Make host"
57-
run: python3 Tools/wasm/wasi make-host
57+
run: python3 Platforms/WASI make-host
5858
- name: "Display build info"
5959
run: make --directory "${CROSS_BUILD_WASI}" pythoninfo
6060
- name: "Test"

Doc/c-api/long.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ Export API
687687
688688
.. versionadded:: 3.14
689689
690-
.. c:struct:: PyLongLayout
690+
.. c:type:: PyLongLayout
691691
692692
Layout of an array of "digits" ("limbs" in the GMP terminology), used to
693693
represent absolute value for arbitrary precision integers.
@@ -727,15 +727,15 @@ Export API
727727
728728
Get the native layout of Python :class:`int` objects.
729729
730-
See the :c:struct:`PyLongLayout` structure.
730+
See the :c:type:`PyLongLayout` structure.
731731
732732
The function must not be called before Python initialization nor after
733733
Python finalization. The returned layout is valid until Python is
734734
finalized. The layout is the same for all Python sub-interpreters
735735
in a process, and so it can be cached.
736736
737737
738-
.. c:struct:: PyLongExport
738+
.. c:type:: PyLongExport
739739
740740
Export of a Python :class:`int` object.
741741
@@ -769,7 +769,7 @@ Export API
769769
770770
Export a Python :class:`int` object.
771771
772-
*export_long* must point to a :c:struct:`PyLongExport` structure allocated
772+
*export_long* must point to a :c:type:`PyLongExport` structure allocated
773773
by the caller. It must not be ``NULL``.
774774
775775
On success, fill in *\*export_long* and return ``0``.
@@ -799,7 +799,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
799799
800800
.. versionadded:: 3.14
801801
802-
.. c:struct:: PyLongWriter
802+
.. c:type:: PyLongWriter
803803
804804
A Python :class:`int` writer instance.
805805
@@ -827,7 +827,7 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
827827
The layout of *digits* is described by :c:func:`PyLong_GetNativeLayout`.
828828
829829
Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``]
830-
(where the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits
830+
(where the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits
831831
per digit).
832832
Any unused most significant digits must be set to ``0``.
833833

Doc/data/stable_abi.dat

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/library/base64.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,20 @@ POST request.
8484
A :exc:`binascii.Error` exception is raised
8585
if *s* is incorrectly padded.
8686

87-
If *validate* is ``False`` (the default), characters that are neither
87+
If *validate* is false (the default), characters that are neither
8888
in the normal base-64 alphabet nor the alternative alphabet are
89-
discarded prior to the padding check. If *validate* is ``True``,
90-
these non-alphabet characters in the input result in a
91-
:exc:`binascii.Error`.
89+
discarded prior to the padding check, but the ``+`` and ``/`` characters
90+
keep their meaning if they are not in *altchars* (they will be discarded
91+
in future Python versions).
92+
If *validate* is true, these non-alphabet characters in the input
93+
result in a :exc:`binascii.Error`.
9294

9395
For more information about the strict base64 check, see :func:`binascii.a2b_base64`
9496

95-
May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2.
97+
.. deprecated:: next
98+
Accepting the ``+`` and ``/`` characters with an alternative alphabet
99+
is now deprecated.
100+
96101

97102
.. function:: standard_b64encode(s)
98103

@@ -123,6 +128,9 @@ POST request.
123128
``/`` in the standard Base64 alphabet, and return the decoded
124129
:class:`bytes`.
125130

131+
.. deprecated:: next
132+
Accepting the ``+`` and ``/`` characters is now deprecated.
133+
126134

127135
.. function:: b32encode(s)
128136

Doc/library/http.cookies.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ The following example demonstrates how to use the :mod:`http.cookies` module.
294294
Set-Cookie: chips=ahoy
295295
Set-Cookie: vienna=finger
296296
>>> C = cookies.SimpleCookie()
297-
>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
297+
>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=;";')
298298
>>> print(C)
299-
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
299+
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=;"
300300
>>> C = cookies.SimpleCookie()
301301
>>> C["oreo"] = "doublestuff"
302302
>>> C["oreo"]["path"] = "/"

Doc/library/idle.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Go to Line
158158

159159
Show Completions
160160
Open a scrollable list allowing selection of existing names. See
161-
:ref:`Completions <completions>` in the Editing and navigation section below.
161+
:ref:`Completions <completions>` in the Editing and Navigation section below.
162162

163163
Expand Word
164164
Expand a prefix you have typed to match a full word in the same window;
@@ -167,7 +167,7 @@ Expand Word
167167
Show Call Tip
168168
After an unclosed parenthesis for a function, open a small window with
169169
function parameter hints. See :ref:`Calltips <calltips>` in the
170-
Editing and navigation section below.
170+
Editing and Navigation section below.
171171

172172
Show Surrounding Parens
173173
Highlight the surrounding parenthesis.
@@ -178,9 +178,9 @@ Format menu (Editor window only)
178178
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179179

180180
Format Paragraph
181-
Reformat the current blank-line-delimited paragraph in comment block or
182-
multiline string or selected line in a string. All lines in the
183-
paragraph will be formatted to less than N columns, where N defaults to 72.
181+
Rewrap the text block containing the text insert cursor.
182+
Avoid code lines. See :ref:`Format block<format-block>` in the
183+
Editing and Navigation section below.
184184

185185
Indent Region
186186
Shift selected lines right by the indent width (default 4 spaces).
@@ -566,6 +566,20 @@ In an editor, import statements have no effect until one runs the file.
566566
One might want to run a file after writing import statements, after
567567
adding function definitions, or after opening an existing file.
568568

569+
.. _format-block:
570+
571+
Format block
572+
^^^^^^^^^^^^
573+
574+
Reformat Paragraph rewraps a block ('paragraph') of contiguous equally
575+
indented non-blank comments, a similar block of text within a multiline
576+
string, or a selected subset of either.
577+
If needed, add a blank line to separate string from code.
578+
Partial lines in a selection expand to complete lines.
579+
The resulting lines have the same indent as before
580+
but have maximum total length of N columns (characters).
581+
Change the default N of 72 on the Window tab of IDLE Settings.
582+
569583
.. _code-context:
570584

571585
Code Context

Doc/using/windows.rst

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ is also an unambiguous ``pymanager`` command. Scripted installs that are
126126
intending to use Python install manager should consider using ``pymanager``, due
127127
to the lower chance of encountering a conflict with existing installs. The only
128128
difference between the two commands is when running without any arguments:
129-
``py`` will install and launch your default interpreter, while ``pymanager``
130-
will display help (``pymanager exec ...`` provides equivalent behaviour to
131-
``py ...``).
129+
``py`` will launch your default interpreter, while ``pymanager`` will display
130+
help (``pymanager exec ...`` provides equivalent behaviour to ``py ...``).
132131

133132
Each of these commands also has a windowed version that avoids creating a
134133
console window. These are ``pyw``, ``pythonw`` and ``pymanagerw``. A ``python3``
@@ -187,12 +186,11 @@ that virtual environment. In this scenario, the ``python`` command was likely
187186
already overridden and none of these checks occurred. However, this behaviour
188187
ensures that the ``py`` command can be used interchangeably.
189188

190-
When you launch either ``python`` or ``py`` but do not have any runtimes
191-
installed, and the requested version is the default, it will be installed
192-
automatically and then launched. Otherwise, the requested version will be
193-
installed if automatic installation is configured (most likely by setting
194-
``PYTHON_MANAGER_AUTOMATIC_INSTALL`` to ``true``), or if the ``py exec`` or
195-
``pymanager exec`` forms of the command were used.
189+
When no runtimes are installed, any launch command will try to install the
190+
requested version and launch it. However, after any version is installed, only
191+
the ``py exec ...`` and ``pymanager exec ...`` commands will install if the
192+
requested version is absent. Other forms of commands will display an error and
193+
direct you to use ``py install`` first.
196194

197195

198196
Command help
@@ -301,6 +299,14 @@ To launch the runtime, directly execute the main executable (typically
301299
302300
$> py install ... [-t=|--target=<PATH>] <TAG>
303301
302+
The ``py exec`` command will install the requested runtime if it is not already
303+
present. This is controlled by the ``automatic_install`` configuration
304+
(:envvar:`PYTHON_MANAGER_AUTOMATIC_INSTALL`), and is enabled by default.
305+
If no runtimes are available at all, all launch commands will do an automatic
306+
install if the configuration setting allows. This is to ensure a good experience
307+
for new users, but should not generally be relied on rather than using the
308+
``py exec`` command or explicit install commands.
309+
304310

305311
.. _pymanager-offline:
306312

@@ -426,9 +432,11 @@ customization.
426432
By default, :file:`%TEMP%`.
427433

428434
* - ``automatic_install``
429-
- ``PYTHON_MANAGER_AUTOMATIC_INSTALL``
430-
- True to allow automatic installs when using ``py exec`` to launch.
431-
Other commands will not automatically install.
435+
- .. envvar:: PYTHON_MANAGER_AUTOMATIC_INSTALL
436+
- True to allow automatic installs when using ``py exec`` to launch (or
437+
``py`` when no runtimes are installed yet).
438+
Other commands will not automatically install, regardless of this
439+
setting.
432440
By default, true.
433441

434442
* - ``include_unmanaged``
@@ -777,7 +785,7 @@ Troubleshooting
777785

778786
If your Python install manager does not seem to be working correctly, please
779787
work through these tests and fixes to see if it helps. If not, please report an
780-
issue at `our bug tracker <https://github.com/python/cpython/issues>`_,
788+
issue at `our bug tracker <https://github.com/python/pymanager/issues>`_,
781789
including any relevant log files (written to your :file:`%TEMP%` directory by
782790
default).
783791

Doc/whatsnew/3.15.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,12 @@ tkinter
792792
using Tcl's ``-all`` and ``-overlap`` options.
793793
(Contributed by Rihaan Meher in :gh:`130848`)
794794

795+
* Added new methods :meth:`!pack_content`, :meth:`!place_content` and
796+
:meth:`!grid_content` which use Tk commands with new names (introduced
797+
in Tk 8.6) instead of :meth:`!*_slaves` methods which use Tk commands
798+
with outdated names.
799+
(Contributed by Serhiy Storchaka in :gh:`143754`)
800+
795801
types
796802
------
797803

@@ -1143,6 +1149,15 @@ Deprecated
11431149
New deprecations
11441150
----------------
11451151

1152+
* :mod:`base64`:
1153+
1154+
* Accepting the ``+`` and ``/`` characters with an alternative alphabet in
1155+
:func:`~base64.b64decode` and :func:`~base64.urlsafe_b64decode` is now
1156+
deprecated.
1157+
In future Python versions they will be errors in the strict mode and
1158+
discarded in the non-strict mode.
1159+
(Contributed by Serhiy Storchaka in :gh:`125346`.)
1160+
11461161
* CLI:
11471162

11481163
* Deprecate :option:`-b` and :option:`!-bb` command-line options

0 commit comments

Comments
 (0)