Skip to content

Commit 1b75074

Browse files
authored
Merge branch 'main' into isearch-paste
2 parents 0d31cd3 + 5afbb60 commit 1b75074

605 files changed

Lines changed: 10726 additions & 20671 deletions

File tree

Some content is hidden

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

.azure-pipelines/windows-layout-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
displayName: Show layout info (${{ parameters.kind }})
1313

1414
- ${{ if eq(parameters.fulltest, 'true') }}:
15-
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)" -i test_launcher
15+
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)"
1616
workingDirectory: $(Build.BinariesDirectory)\layout-${{ parameters.kind }}-$(arch)
1717
displayName: ${{ parameters.kind }} Tests
1818
env:

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*.zip binary
2020

2121
# Specific binary files
22-
PC/classicAppCompat.* binary
22+
# -- None right now --
2323

2424
# Text files that should not be subject to eol conversion
2525
[attr]noeol -text

.github/CODEOWNERS

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,8 @@ Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski
188188
PC/ @python/windows-team
189189
PCbuild/ @python/windows-team
190190

191-
# Windows installer packages
192-
Tools/msi/ @python/windows-team
193-
Tools/nuget/ @python/windows-team
194-
195-
# Windows Launcher
196-
PC/launcher.c @python/windows-team @vsajip
191+
# Windows Venv launcher/redirector
192+
PC/venvlauncher.c @python/windows-team @vsajip
197193

198194

199195
# ----------------------------------------------------------------------------

.github/workflows/build.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,6 @@ jobs:
181181
free-threading: ${{ matrix.free-threading }}
182182
interpreter: ${{ matrix.interpreter }}
183183

184-
build-windows-msi:
185-
# ${{ '' } is a hack to nest jobs under the same sidebar category.
186-
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
187-
needs: build-context
188-
if: fromJSON(needs.build-context.outputs.run-windows-msi)
189-
strategy:
190-
fail-fast: false
191-
matrix:
192-
arch:
193-
- x86
194-
- x64
195-
- arm64
196-
uses: ./.github/workflows/reusable-windows-msi.yml
197-
with:
198-
arch: ${{ matrix.arch }}
199-
200184
build-macos:
201185
name: >-
202186
macOS
@@ -650,7 +634,6 @@ jobs:
650634
- check-generated-files
651635
- check-c-api-docs
652636
- build-windows
653-
- build-windows-msi
654637
- build-macos
655638
- build-ubuntu
656639
- build-ubuntu-ssltests
@@ -671,7 +654,6 @@ jobs:
671654
allowed-failures: >-
672655
build-android,
673656
build-emscripten,
674-
build-windows-msi,
675657
build-ubuntu-ssltests,
676658
test-hypothesis,
677659
cifuzz,

.github/workflows/reusable-context.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ on: # yamllint disable-line rule:truthy
4747
run-wasi:
4848
description: Whether to run the WASI tests
4949
value: ${{ jobs.compute-changes.outputs.run-wasi }} # bool
50-
run-windows-msi:
51-
description: Whether to run the MSI installer smoke tests
52-
value: ${{ jobs.compute-changes.outputs.run-windows-msi }} # bool
5350
run-windows-tests:
5451
description: Whether to run the Windows tests
5552
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
@@ -73,7 +70,6 @@ jobs:
7370
run-ubuntu: ${{ steps.changes.outputs.run-ubuntu }}
7471
run-emscripten: ${{ steps.changes.outputs.run-emscripten }}
7572
run-wasi: ${{ steps.changes.outputs.run-wasi }}
76-
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
7773
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
7874
steps:
7975
- name: Set up Python

.github/workflows/reusable-san.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
run: |
4040
sudo ./.github/workflows/posix-deps-apt.sh
4141
# On ubuntu-26.04 image, clang is clang-21 by default
42+
# NOTE: when bumping to a new version of clang,
43+
# please update the versions in `Tools/pixi-packages/variants.yaml` too.
4244
echo "CC=clang" >> "$GITHUB_ENV"
4345
echo "CXX=clang++" >> "$GITHUB_ENV"
4446
- name: TSan option setup

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ gmon.out
5050

5151
*.exe
5252

53-
# Ignore core dumps... but not Tools/msi/core/ or the like.
53+
# Ignore core dumps... but not .../core/ subdirectories
5454
core
5555
!core/
5656

@@ -124,10 +124,14 @@ PCbuild/*-pgo
124124
PCbuild/*.VC.db
125125
PCbuild/*.VC.opendb
126126
PCbuild/amd64/
127+
PCbuild/amd64t/
127128
PCbuild/arm32/
129+
PCbuild/arm32t/
128130
PCbuild/arm64/
131+
PCbuild/arm64t/
129132
PCbuild/obj/
130133
PCbuild/win32/
134+
PCbuild/win32t/
131135
Tools/unicode/data/
132136
/autom4te.cache
133137
/build/
@@ -158,7 +162,6 @@ Tools/unicode/data/
158162
/coverage/
159163
/externals/
160164
/htmlcov/
161-
Tools/msi/obj
162165
Tools/ssl/amd64
163166
Tools/ssl/win32
164167
Tools/freeze/test/outdir

Doc/c-api/exceptions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,12 @@ Querying the error indicator
499499
.. c:function:: void PyErr_SetRaisedException(PyObject *exc)
500500
501501
Set *exc* as the exception currently being raised,
502-
clearing the existing exception if one is set.
502+
clearing the existing exception if one is set. If *exc* is ``NULL``,
503+
just clear the existing exception.
503504
504-
.. warning::
505+
*exc* must be a valid exception or ``NULL``.
505506
506-
This call ":term:`steals <steal>`" a reference to *exc*,
507-
which must be a valid exception.
507+
This call ":term:`steals <steal>`" a reference to *exc*.
508508
509509
.. versionadded:: 3.12
510510

Doc/c-api/frame.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,62 @@ Unless using :pep:`523`, you will not need this.
243243
Return the currently executing line number, or -1 if there is no line number.
244244
245245
.. versionadded:: 3.12
246+
247+
248+
.. c:var:: const PyTypeObject *PyUnstable_ExecutableKinds
249+
250+
An array of executable kinds (executor types) for frames, used for internal
251+
debugging and tracing.
252+
253+
Tools like debuggers and profilers can use this to identify the type of execution
254+
context associated with a frame (such as to filter out internal frames).
255+
The entries are indexed by the following constants:
256+
257+
.. list-table::
258+
:header-rows: 1
259+
:widths: auto
260+
261+
* - Constant
262+
- Description
263+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP
264+
- The frame is internal (For example: inlined) and should be skipped by tools.
265+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION
266+
- The frame corresponds to a standard Python function.
267+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION
268+
- The frame corresponds to a function defined in native code.
269+
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR
270+
- The frame corresponds to a method on a class instance.
271+
272+
However, Python's C API lacks a function to read the executable kind from
273+
a frame. Instead, use this recipe:
274+
275+
.. code-block:: c
276+
277+
int
278+
get_executable_kind(PyFrameObject *frame)
279+
{
280+
_PyInterpreterFrame *f = frame->f_frame;
281+
PyObject *exec = PyStackRef_AsPyObjectBorrow(f->f_executable);
282+
283+
if (PyCode_Check(exec)) {
284+
return PyUnstable_EXECUTABLE_KIND_PY_FUNCTION;
285+
}
286+
if (PyMethod_Check(exec)) {
287+
return PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION;
288+
}
289+
if (Py_IS_TYPE(exec, &PyMethodDescr_Type)) {
290+
return PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR;
291+
}
292+
293+
return PyUnstable_EXECUTABLE_KIND_SKIP;
294+
}
295+
296+
.. versionadded:: 3.13
297+
298+
299+
.. c:macro:: PyUnstable_EXECUTABLE_KINDS
300+
301+
The number of entries in :c:data:`PyUnstable_ExecutableKinds`.
302+
303+
.. versionadded:: 3.13
304+

0 commit comments

Comments
 (0)