Skip to content

Commit dd90c2e

Browse files
committed
Merge branch 'main' into pyrepl/completions-below
2 parents da921c1 + d472b4f commit dd90c2e

File tree

271 files changed

+5522
-2159
lines changed

Some content is hidden

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

271 files changed

+5522
-2159
lines changed

.github/workflows/jit.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ on:
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
8+
- '!Python/perf_jit_trampoline.c'
9+
- '!**/*.md'
10+
- '!**/*.ini'
811
push:
912
paths:
1013
- '**jit**'
1114
- 'Python/bytecodes.c'
1215
- 'Python/optimizer*.c'
16+
- '!Python/perf_jit_trampoline.c'
17+
- '!**/*.md'
18+
- '!**/*.ini'
1319
workflow_dispatch:
1420

1521
permissions:
@@ -144,3 +150,21 @@ jobs:
144150
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
145151
make all --jobs 4
146152
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
153+
154+
jit-with-disabled-gil:
155+
name: Free-Threaded (Debug)
156+
runs-on: ubuntu-latest
157+
steps:
158+
- uses: actions/checkout@v4
159+
- uses: actions/setup-python@v5
160+
with:
161+
python-version: '3.11'
162+
- name: Build with JIT enabled and GIL disabled
163+
run: |
164+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
165+
export PATH="$(llvm-config-18 --bindir):$PATH"
166+
./configure --enable-experimental-jit --with-pydebug --disable-gil
167+
make all --jobs 4
168+
- name: Run tests
169+
run: |
170+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.github/workflows/mypy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ concurrency:
3434
jobs:
3535
mypy:
3636
strategy:
37+
fail-fast: false
3738
matrix:
3839
target: [
3940
"Lib/_pyrepl",

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ jobs:
6262
python Doc/tools/check-warnings.py \
6363
--annotate-diff '${{ env.branch_base }}' '${{ env.branch_pr }}' \
6464
--fail-if-regression \
65-
--fail-if-improved
65+
--fail-if-improved \
66+
--fail-if-new-news-nit
6667
6768
# This build doesn't use problem matchers or check annotations
6869
build_doc_oldest_supported_sphinx:

Doc/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ help:
3232
@echo " clean to remove build files"
3333
@echo " venv to create a venv with necessary tools"
3434
@echo " html to make standalone HTML files"
35+
@echo " gettext to generate POT files"
3536
@echo " htmlview to open the index page built by the html target in your browser"
3637
@echo " htmllive to rebuild and reload HTML files in your browser"
3738
@echo " htmlhelp to make HTML files and a HTML help project"
@@ -140,6 +141,11 @@ pydoc-topics: build
140141
@echo "Building finished; now run this:" \
141142
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
142143

144+
.PHONY: gettext
145+
gettext: BUILDER = gettext
146+
gettext: SPHINXOPTS += '-d build/doctrees-gettext'
147+
gettext: build
148+
143149
.PHONY: htmlview
144150
htmlview: html
145151
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"

Doc/c-api/dict.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Dictionary Objects
191191
to both *default_value* and *\*result* (if it's not ``NULL``).
192192
These may refer to the same object: in that case you hold two separate
193193
references to it.
194+
194195
.. versionadded:: 3.13
195196
196197

Doc/c-api/frame.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,18 @@ See also :ref:`Reflection <reflection>`.
121121
.. c:function:: PyObject* PyFrame_GetLocals(PyFrameObject *frame)
122122
123123
Get the *frame*'s :attr:`~frame.f_locals` attribute.
124-
If the frame refers to a function or comprehension, this returns
125-
a write-through proxy object that allows modifying the locals.
126-
In all other cases (classes, modules) it returns the :class:`dict`
127-
representing the frame locals directly.
124+
If the frame refers to an :term:`optimized scope`, this returns a
125+
write-through proxy object that allows modifying the locals.
126+
In all other cases (classes, modules, :func:`exec`, :func:`eval`) it returns
127+
the mapping representing the frame locals directly (as described for
128+
:func:`locals`).
128129
129130
Return a :term:`strong reference`.
130131
131132
.. versionadded:: 3.11
132133
133134
.. versionchanged:: 3.13
134-
Return a proxy object for functions and comprehensions.
135+
As part of :pep:`667`, return a proxy object for optimized scopes.
135136
136137
137138
.. c:function:: int PyFrame_GetLineNumber(PyFrameObject *frame)

Doc/c-api/hash.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.
2929

3030
.. versionadded:: 3.13
3131

32+
.. c:macro:: PyHASH_MULTIPLIER
33+
34+
Prime multiplier used in string and various other hashes.
35+
36+
.. versionadded:: 3.13
37+
3238
.. c:macro:: PyHASH_INF
3339
3440
The hash value returned for a positive infinity.

Doc/c-api/module.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,14 @@ The available slot types are:
427427
This slot is ignored by Python builds not configured with
428428
:option:`--disable-gil`. Otherwise, it determines whether or not importing
429429
this module will cause the GIL to be automatically enabled. See
430-
:envvar:`PYTHON_GIL` and :option:`-X gil <-X>` for more detail.
430+
:ref:`free-threaded-cpython` for more detail.
431431
432432
Multiple ``Py_mod_gil`` slots may not be specified in one module definition.
433433
434434
If ``Py_mod_gil`` is not specified, the import machinery defaults to
435435
``Py_MOD_GIL_USED``.
436436
437-
.. versionadded: 3.13
437+
.. versionadded:: 3.13
438438
439439
See :PEP:`489` for more details on multi-phase initialization.
440440

Doc/c-api/monitoring.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ See :mod:`sys.monitoring` for descriptions of the events.
121121
:c:func:`PyErr_GetRaisedException`).
122122
123123
124-
.. c:function:: int PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset)
124+
.. c:function:: int PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelike, int32_t offset, PyObject *value)
125125
126-
Fire a ``STOP_ITERATION`` event with the current exception (as returned by
127-
:c:func:`PyErr_GetRaisedException`).
126+
Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:`StopIteration`, it is used. Otherwise,
127+
a new :exc:`StopIteration` instance is created with ``value`` as its argument.
128128
129129
130130
Managing the Monitoring State

Doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@
374374
# Split the index
375375
html_split_index = True
376376

377+
# Split pot files one per reST file
378+
gettext_compact = False
377379

378380
# Options for LaTeX output
379381
# ------------------------

0 commit comments

Comments
 (0)