Skip to content

Commit 2635360

Browse files
committed
Merge branch 'master' into support-complex-arrays/146151
2 parents 2a9a1b4 + 8e1469c commit 2635360

22 files changed

Lines changed: 771 additions & 48 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ Tools/peg_generator/pegen/grammar_parser.py generated
112112
aclocal.m4 generated
113113
configure generated
114114
*.min.js generated
115+
package-lock.json generated

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
self-hosted-runner:
2+
# Pending release of actionlint > 1.7.11 for macos-26-intel support
3+
# https://github.com/rhysd/actionlint/pull/629
4+
labels: ["macos-26-intel"]
5+
16
config-variables: null
27

38
paths:

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,16 @@ jobs:
198198
strategy:
199199
fail-fast: false
200200
matrix:
201-
# macos-14 is M1, macos-15-intel is Intel.
202-
# macos-15-intel only runs tests against the GIL-enabled CPython.
201+
# macos-26 is Apple Silicon, macos-26-intel is Intel.
202+
# macos-26-intel only runs tests against the GIL-enabled CPython.
203203
os:
204-
- macos-14
205-
- macos-15-intel
204+
- macos-26
205+
- macos-26-intel
206206
free-threading:
207207
- false
208208
- true
209209
exclude:
210-
- os: macos-15-intel
210+
- os: macos-26-intel
211211
free-threading: true
212212
uses: ./.github/workflows/reusable-macos.yml
213213
with:
@@ -336,7 +336,7 @@ jobs:
336336
matrix:
337337
include:
338338
- arch: aarch64
339-
runs-on: macos-14
339+
runs-on: macos-26
340340
- arch: x86_64
341341
runs-on: ubuntu-24.04
342342

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
- false
100100
include:
101101
- target: x86_64-apple-darwin/clang
102-
runner: macos-15-intel
102+
runner: macos-26-intel
103103
- target: aarch64-apple-darwin/clang
104-
runner: macos-14
104+
runner: macos-26
105105
steps:
106106
- uses: actions/checkout@v6
107107
with:

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ jobs:
5252
--prefix=/opt/python-dev \
5353
--with-openssl="$(brew --prefix openssl@3.5)"
5454
- name: Build CPython
55-
if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }}
55+
if : ${{ inputs.free-threading || inputs.os != 'macos-26-intel' }}
5656
run: gmake -j8
5757
- name: Build CPython for compiler warning check
58-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
58+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
5959
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
6060
- name: Display build info
6161
run: make pythoninfo
6262
- name: Check compiler warnings
63-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
63+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
6464
run: >-
6565
python3 Tools/build/check_warnings.py
6666
--compiler-output-file-path=compiler_output_macos.txt

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ jobs:
6767
matrix:
6868
include:
6969
- target: x86_64-apple-darwin/clang
70-
runner: macos-15-intel
70+
runner: macos-26-intel
7171
- target: aarch64-apple-darwin/clang
72-
runner: macos-14
72+
runner: macos-26
7373
steps:
7474
- uses: actions/checkout@v6
7575
with:

Doc/whatsnew/3.14.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ on x86-64 and AArch64 architectures.
454454
However, a future release of GCC is expected to support this as well.
455455

456456
This feature is opt-in for now. Enabling profile-guided optimization is highly
457-
recommendeded when using the new interpreter as it is the only configuration
457+
recommended when using the new interpreter as it is the only configuration
458458
that has been tested and validated for improved performance.
459459
For further information, see :option:`--with-tail-call-interp`.
460460

Lib/_py_warnings.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,18 +703,18 @@ def __enter__(self):
703703
context = None
704704
self._filters = self._module.filters
705705
self._module.filters = self._filters[:]
706-
self._showwarning = self._module.showwarning
707706
self._showwarnmsg_impl = self._module._showwarnmsg_impl
707+
self._showwarning = self._module.showwarning
708708
self._module._filters_mutated_lock_held()
709709
if self._record:
710710
if _use_context:
711711
context.log = log = []
712712
else:
713713
log = []
714714
self._module._showwarnmsg_impl = log.append
715-
# Reset showwarning() to the default implementation to make sure
716-
# that _showwarnmsg() calls _showwarnmsg_impl()
717-
self._module.showwarning = self._module._showwarning_orig
715+
# Reset showwarning() to the default implementation to make sure
716+
# that _showwarnmsg() calls _showwarnmsg_impl()
717+
self._module.showwarning = self._module._showwarning_orig
718718
else:
719719
log = None
720720
if self._filter is not None:
@@ -729,8 +729,8 @@ def __exit__(self, *exc_info):
729729
self._module._warnings_context.set(self._saved_context)
730730
else:
731731
self._module.filters = self._filters
732-
self._module.showwarning = self._showwarning
733732
self._module._showwarnmsg_impl = self._showwarnmsg_impl
733+
self._module.showwarning = self._showwarning
734734
self._module._filters_mutated_lock_held()
735735

736736

Lib/test/test_cmath.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ def polar_with_errno_set(z):
406406
_testcapi.set_errno(0)
407407
self.check_polar(polar_with_errno_set)
408408

409+
@unittest.skipIf(sys.platform.startswith("sunos"),
410+
"skipping, see gh-138573")
409411
def test_phase(self):
410412
self.assertAlmostEqual(phase(0), 0.)
411413
self.assertAlmostEqual(phase(1.), 0.)

Lib/test/test_lazy_import/__init__.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,49 @@ def test_env_var_lazy_imports_none_disables_all_lazy(self):
10881088
self.assertEqual(result.returncode, 0, f"stderr: {result.stderr}")
10891089
self.assertIn("EAGER", result.stdout)
10901090

1091+
def test_cli_lazy_imports_none_disables_dunder_lazy_modules(self):
1092+
"""-X lazy_imports=none should override __lazy_modules__."""
1093+
code = textwrap.dedent("""
1094+
import sys
1095+
__lazy_modules__ = ["json"]
1096+
import json
1097+
if 'json' in sys.modules:
1098+
print("EAGER")
1099+
else:
1100+
print("LAZY")
1101+
""")
1102+
result = subprocess.run(
1103+
[sys.executable, "-X", "lazy_imports=none", "-c", code],
1104+
capture_output=True,
1105+
text=True,
1106+
)
1107+
self.assertEqual(result.returncode, 0, f"stderr: {result.stderr}")
1108+
self.assertIn("EAGER", result.stdout)
1109+
1110+
def test_env_var_lazy_imports_none_disables_dunder_lazy_modules(self):
1111+
"""PYTHON_LAZY_IMPORTS=none should override __lazy_modules__."""
1112+
code = textwrap.dedent("""
1113+
import sys
1114+
__lazy_modules__ = ["json"]
1115+
import json
1116+
if 'json' in sys.modules:
1117+
print("EAGER")
1118+
else:
1119+
print("LAZY")
1120+
""")
1121+
import os
1122+
1123+
env = os.environ.copy()
1124+
env["PYTHON_LAZY_IMPORTS"] = "none"
1125+
result = subprocess.run(
1126+
[sys.executable, "-c", code],
1127+
capture_output=True,
1128+
text=True,
1129+
env=env,
1130+
)
1131+
self.assertEqual(result.returncode, 0, f"stderr: {result.stderr}")
1132+
self.assertIn("EAGER", result.stdout)
1133+
10911134
def test_cli_overrides_env_var(self):
10921135
"""Command-line option should take precedence over environment variable."""
10931136
# PEP 810: -X lazy_imports takes precedence over PYTHON_LAZY_IMPORTS

0 commit comments

Comments
 (0)