Skip to content

Commit bfb5f36

Browse files
authored
Merge branch 'main' into gh-132917-use-proc-status
2 parents f7fe507 + 0a3ccb8 commit bfb5f36

Some content is hidden

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

55 files changed

+1426
-1687
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ Lib/test/test_interpreters/ @ericsnowcurrently
298298
**/*-ios* @freakboy3742
299299

300300
# WebAssembly
301-
/Tools/wasm/ @brettcannon @freakboy3742
301+
Tools/wasm/config.site-wasm32-emscripten @freakboy3742
302+
/Tools/wasm/README.md @brettcannon @freakboy3742
303+
/Tools/wasm/wasi-env @brettcannon
304+
/Tools/wasm/wasi.py @brettcannon
305+
/Tools/wasm/emscripten @freakboy3742
306+
/Tools/wasm/wasi @brettcannon
302307

303308
# SBOM
304309
/Misc/externals.spdx.json @sethmlarson

.github/workflows/mypy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ on:
1919
- "Tools/jit/**"
2020
- "Tools/peg_generator/**"
2121
- "Tools/requirements-dev.txt"
22-
- "Tools/wasm/**"
2322
workflow_dispatch:
2423

2524
permissions:
@@ -51,7 +50,6 @@ jobs:
5150
"Tools/clinic",
5251
"Tools/jit",
5352
"Tools/peg_generator",
54-
"Tools/wasm",
5553
]
5654
steps:
5755
- uses: actions/checkout@v4

Doc/library/heapq-binary-tree.svg

Lines changed: 211 additions & 0 deletions
Loading

Doc/library/heapq.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,11 @@ elements are considered to be infinite. The interesting property of a heap is
312312
that ``a[0]`` is always its smallest element.
313313

314314
The strange invariant above is meant to be an efficient memory representation
315-
for a tournament. The numbers below are *k*, not ``a[k]``::
315+
for a tournament. The numbers below are *k*, not ``a[k]``:
316316

317-
0
318-
319-
1 2
320-
321-
3 4 5 6
322-
323-
7 8 9 10 11 12 13 14
324-
325-
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
317+
.. figure:: heapq-binary-tree.svg
318+
:align: center
319+
:alt: Example (min-heap) binary tree.
326320

327321
In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a usual
328322
binary tournament we see in sports, each cell is the winner over the two cells

Doc/library/stdtypes.rst

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4823,7 +4823,13 @@ can be used interchangeably to index the same dictionary entry.
48234823
being added is already present, the value from the keyword argument
48244824
replaces the value from the positional argument.
48254825

4826-
To illustrate, the following examples all return a dictionary equal to
4826+
Providing keyword arguments as in the first example only works for keys that
4827+
are valid Python identifiers. Otherwise, any valid keys can be used.
4828+
4829+
Dictionaries compare equal if and only if they have the same ``(key,
4830+
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
4831+
:exc:`TypeError`. To illustrate dictionary creation and equality,
4832+
the following examples all return a dictionary equal to
48274833
``{"one": 1, "two": 2, "three": 3}``::
48284834

48294835
>>> a = dict(one=1, two=2, three=3)
@@ -4838,6 +4844,27 @@ can be used interchangeably to index the same dictionary entry.
48384844
Providing keyword arguments as in the first example only works for keys that
48394845
are valid Python identifiers. Otherwise, any valid keys can be used.
48404846

4847+
Dictionaries preserve insertion order. Note that updating a key does not
4848+
affect the order. Keys added after deletion are inserted at the end. ::
4849+
4850+
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
4851+
>>> d
4852+
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
4853+
>>> list(d)
4854+
['one', 'two', 'three', 'four']
4855+
>>> list(d.values())
4856+
[1, 2, 3, 4]
4857+
>>> d["one"] = 42
4858+
>>> d
4859+
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
4860+
>>> del d["two"]
4861+
>>> d["two"] = None
4862+
>>> d
4863+
{'one': 42, 'three': 3, 'four': 4, 'two': None}
4864+
4865+
.. versionchanged:: 3.7
4866+
Dictionary order is guaranteed to be insertion order. This behavior was
4867+
an implementation detail of CPython from 3.6.
48414868

48424869
These are the operations that dictionaries support (and therefore, custom
48434870
mapping types should support too):
@@ -5008,32 +5035,6 @@ can be used interchangeably to index the same dictionary entry.
50085035

50095036
.. versionadded:: 3.9
50105037

5011-
Dictionaries compare equal if and only if they have the same ``(key,
5012-
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
5013-
:exc:`TypeError`.
5014-
5015-
Dictionaries preserve insertion order. Note that updating a key does not
5016-
affect the order. Keys added after deletion are inserted at the end. ::
5017-
5018-
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
5019-
>>> d
5020-
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
5021-
>>> list(d)
5022-
['one', 'two', 'three', 'four']
5023-
>>> list(d.values())
5024-
[1, 2, 3, 4]
5025-
>>> d["one"] = 42
5026-
>>> d
5027-
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
5028-
>>> del d["two"]
5029-
>>> d["two"] = None
5030-
>>> d
5031-
{'one': 42, 'three': 3, 'four': 4, 'two': None}
5032-
5033-
.. versionchanged:: 3.7
5034-
Dictionary order is guaranteed to be insertion order. This behavior was
5035-
an implementation detail of CPython from 3.6.
5036-
50375038
Dictionaries and dictionary views are reversible. ::
50385039

50395040
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}

Doc/reference/lexical_analysis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ which is recognized by Bram Moolenaar's VIM.
9999

100100
If no encoding declaration is found, the default encoding is UTF-8. If the
101101
implicit or explicit encoding of a file is UTF-8, an initial UTF-8 byte-order
102-
mark (b'\xef\xbb\xbf') is ignored rather than being a syntax error.
102+
mark (``b'\xef\xbb\xbf'``) is ignored rather than being a syntax error.
103103

104104
If an encoding is declared, the encoding name must be recognized by Python
105105
(see :ref:`standard-encodings`). The

Doc/tools/extensions/pyspecific.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from sphinx.util.docutils import SphinxDirective
2323

2424
# Used in conf.py and updated here by python/release-tools/run_release.py
25-
SOURCE_URI = 'https://github.com/python/cpython/tree/3.14/%s'
25+
SOURCE_URI = 'https://github.com/python/cpython/tree/main/%s'
2626

2727
# monkey-patch reST parser to disable alphabetic and roman enumerated lists
2828
from docutils.parsers.rst.states import Body

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ New features
139139
------------
140140

141141
* TODO
142+
142143
Porting to Python 3.15
143144
----------------------
144145

Doc/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ anyone wishing to stay up-to-date after a new release.
1111
.. toctree::
1212
:maxdepth: 2
1313

14+
3.15.rst
1415
3.14.rst
1516
3.13.rst
1617
3.12.rst

Grammar/Tokens

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# When adding new tokens, remember to update the PEG generator in
2+
# Tools/peg_generator/pegen/parser_generator.py
3+
# This will ensure that older versions of Python can generate a Python parser
4+
# using "python -m pegen python <GRAMMAR FILE>".
5+
16
ENDMARKER
27
NAME
38
NUMBER

0 commit comments

Comments
 (0)