Skip to content

Commit f1b50c1

Browse files
Merge branch 'main' into os-NODEV
2 parents 76ad8aa + 859aecc commit f1b50c1

Some content is hidden

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

43 files changed

+3225
-780
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,4 @@ Python/stdlib_module_names.h generated
103103
Tools/peg_generator/pegen/grammar_parser.py generated
104104
aclocal.m4 generated
105105
configure generated
106+
*.min.js generated

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
7272
include:
7373
- target: i686-pc-windows-msvc/msvc
7474
architecture: Win32
75-
runner: windows-latest
75+
runner: windows-2022
7676
- target: x86_64-pc-windows-msvc/msvc
7777
architecture: x64
78-
runner: windows-latest
78+
runner: windows-2022
7979
- target: aarch64-pc-windows-msvc/msvc
8080
architecture: ARM64
8181
runner: windows-11-arm

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
jobs:
1818
build:
1919
name: installer for ${{ inputs.arch }}
20-
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-latest' }}
20+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
2121
timeout-minutes: 60
2222
env:
2323
ARCH: ${{ inputs.arch }}

.github/workflows/reusable-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
jobs:
2222
build:
2323
name: Build and test (${{ inputs.arch }})
24-
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-latest' }}
24+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
2525
timeout-minutes: 60
2626
env:
2727
ARCH: ${{ inputs.arch }}

.github/workflows/tail-call.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ jobs:
4949
include:
5050
# - target: i686-pc-windows-msvc/msvc
5151
# architecture: Win32
52-
# runner: windows-latest
52+
# runner: windows-2022
5353
- target: x86_64-pc-windows-msvc/msvc
5454
architecture: x64
55-
runner: windows-latest
55+
runner: windows-2022
5656
# - target: aarch64-pc-windows-msvc/msvc
5757
# architecture: ARM64
58-
# runner: windows-latest
58+
# runner: windows-2022
5959
- target: x86_64-apple-darwin/clang
6060
architecture: x86_64
6161
runner: macos-13

Doc/library/importlib.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ Functions
124124
need to call :func:`invalidate_caches` in order for the new module to be
125125
noticed by the import system.
126126

127+
If the module cannot be imported, :func:`import_module` will raise
128+
:exc:`ImportError` or an appropriate subclass like
129+
:exc:`ModuleNotFoundError`.
130+
127131
.. versionchanged:: 3.3
128132
Parent packages are automatically imported.
129133

Doc/license.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,3 +1169,33 @@ contributors. The pyzstd code is distributed under the 3-Clause BSD License::
11691169
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
11701170
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11711171
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1172+
1173+
1174+
Profiling module
1175+
----------------
1176+
1177+
The :mod:`!profiling` module includes vendored third-party libraries in
1178+
:file:`Lib/profiling/sampling/_vendor/` with the following licenses:
1179+
1180+
**d3-flamegraph**
1181+
1182+
The d3-flamegraph library is distributed under the Apache License, Version 2.0.
1183+
See the OpenSSL section above for the full text of the Apache License Version 2.0.
1184+
1185+
**d3.js**
1186+
1187+
The d3.js library contains the following notice::
1188+
1189+
Copyright 2010-2021 Mike Bostock
1190+
1191+
Permission to use, copy, modify, and/or distribute this software for any purpose
1192+
with or without fee is hereby granted, provided that the above copyright notice
1193+
and this permission notice appear in all copies.
1194+
1195+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1196+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
1197+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1198+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
1199+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1200+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
1201+
THIS SOFTWARE.

Doc/reference/datamodel.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,17 +3142,20 @@ objects. The :mod:`collections.abc` module provides a
31423142
:term:`abstract base class` to help create those methods from a base set of
31433143
:meth:`~object.__getitem__`, :meth:`~object.__setitem__`,
31443144
:meth:`~object.__delitem__`, and :meth:`!keys`.
3145-
Mutable sequences should provide methods :meth:`~sequence.append`,
3146-
:meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~sequence.extend`,
3147-
:meth:`~sequence.insert`, :meth:`~sequence.pop`, :meth:`~sequence.remove`,
3148-
:meth:`~sequence.reverse` and :meth:`!sort`,
3145+
3146+
Mutable sequences should provide methods
3147+
:meth:`~sequence.append`, :meth:`~sequence.clear`, :meth:`~sequence.count`,
3148+
:meth:`~sequence.extend`, :meth:`~sequence.index`, :meth:`~sequence.insert`,
3149+
:meth:`~sequence.pop`, :meth:`~sequence.remove`, and :meth:`~sequence.reverse`,
31493150
like Python standard :class:`list` objects.
31503151
Finally, sequence types should implement addition (meaning concatenation) and
31513152
multiplication (meaning repetition) by defining the methods
31523153
:meth:`~object.__add__`, :meth:`~object.__radd__`, :meth:`~object.__iadd__`,
31533154
:meth:`~object.__mul__`, :meth:`~object.__rmul__` and :meth:`~object.__imul__`
31543155
described below; they should not define other numerical
3155-
operators. It is recommended that both mappings and sequences implement the
3156+
operators.
3157+
3158+
It is recommended that both mappings and sequences implement the
31563159
:meth:`~object.__contains__` method to allow efficient use of the ``in``
31573160
operator; for
31583161
mappings, ``in`` should search the mapping's keys; for sequences, it should

Grammar/python.gram

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ del_stmt[stmt_ty]:
212212

213213
yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }
214214

215-
assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }
215+
assert_stmt[stmt_ty]:
216+
| invalid_assert_stmt
217+
| 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }
216218

217219
import_stmt[stmt_ty]:
218220
| invalid_import
@@ -1302,6 +1304,25 @@ invalid_raise_stmt:
13021304
invalid_del_stmt:
13031305
| 'del' a=star_expressions {
13041306
RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }
1307+
invalid_assert_stmt:
1308+
| 'assert' a=expression '=' b=expression {
1309+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1310+
a, b,
1311+
"cannot assign to %s here. Maybe you meant '==' instead of '='?",
1312+
_PyPegen_get_expr_name(a)) }
1313+
| 'assert' expression ',' a=expression '=' b=expression {
1314+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1315+
a, b,
1316+
"cannot assign to %s here. Maybe you meant '==' instead of '='?",
1317+
_PyPegen_get_expr_name(a)) }
1318+
| 'assert' a=expression ':=' b=expression {
1319+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1320+
a, b,
1321+
"cannot use named expression without parentheses here") }
1322+
| 'assert' expression ',' a=expression ':=' b=expression {
1323+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1324+
a, b,
1325+
"cannot use named expression without parentheses here") }
13051326
invalid_block:
13061327
| NEWLINE !INDENT { RAISE_INDENTATION_ERROR("expected an indented block") }
13071328
invalid_comprehension:

Include/internal/pycore_magic_number.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,13 @@ Known values:
279279
Python 3.14b1 3624 (Don't optimize LOAD_FAST when local is killed by DELETE_FAST)
280280
Python 3.14b3 3625 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST)
281281
Python 3.14rc2 3626 (Fix missing exception handlers in logical expression)
282+
Python 3.14rc3 3627 (Fix miscompilation of some module-level annotations)
282283
Python 3.15a0 3650 (Initial version)
283284
Python 3.15a1 3651 (Simplify LOAD_CONST)
284285
Python 3.15a1 3652 (Virtual iterators)
285286
Python 3.15a1 3653 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST)
286287
Python 3.15a1 3654 (Fix missing exception handlers in logical expression)
288+
Python 3.15a1 3655 (Fix miscompilation of some module-level annotations)
287289
288290
289291
Python 3.16 will start with 3700
@@ -297,7 +299,7 @@ PC/launcher.c must also be updated.
297299
298300
*/
299301

300-
#define PYC_MAGIC_NUMBER 3654
302+
#define PYC_MAGIC_NUMBER 3655
301303
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
302304
(little-endian) and then appending b'\r\n'. */
303305
#define PYC_MAGIC_NUMBER_TOKEN \

0 commit comments

Comments
 (0)