Skip to content

Commit 0b67450

Browse files
authored
Merge branch 'main' into test_metacls_PyCSimpleType_dunder_init
2 parents e1831ac + 3275cb1 commit 0b67450

File tree

121 files changed

+1602
-856
lines changed

Some content is hidden

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

121 files changed

+1602
-856
lines changed

.github/CODEOWNERS

+3-3
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ Modules/_interp*module.c @ericsnowcurrently
255255
Lib/test/test_interpreters/ @ericsnowcurrently
256256

257257
# Android
258-
**/*Android* @mhsmith
259-
**/*android* @mhsmith
258+
**/*Android* @mhsmith @freakboy3742
259+
**/*android* @mhsmith @freakboy3742
260260

261261
# iOS (but not termios)
262262
**/iOS* @freakboy3742
@@ -267,7 +267,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
267267
**/*-ios* @freakboy3742
268268

269269
# WebAssembly
270-
/Tools/wasm/ @brettcannon
270+
/Tools/wasm/ @brettcannon @freakboy3742
271271

272272
# SBOM
273273
/Misc/externals.spdx.json @sethmlarson

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ jobs:
468468
- name: Display build info
469469
run: make pythoninfo
470470
- name: Tests
471-
run: xvfb-run make test
471+
run: xvfb-run make ci
472472

473473
build_tsan:
474474
name: 'Thread sanitizer'

.github/workflows/jit.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- true
6262
- false
6363
llvm:
64-
- 18
64+
- 19
6565
include:
6666
- target: i686-pc-windows-msvc/msvc
6767
architecture: Win32
@@ -121,10 +121,15 @@ jobs:
121121
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
122122
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
123123
124+
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
125+
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
126+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
127+
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
124128
- name: Native macOS
125129
if: runner.os == 'macOS'
126130
run: |
127131
brew update
132+
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
128133
brew install llvm@${{ matrix.llvm }}
129134
SDKROOT="$(xcrun --show-sdk-path)" \
130135
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
@@ -165,15 +170,19 @@ jobs:
165170
name: Free-Threaded (Debug)
166171
needs: interpreter
167172
runs-on: ubuntu-latest
173+
strategy:
174+
matrix:
175+
llvm:
176+
- 19
168177
steps:
169178
- uses: actions/checkout@v4
170179
- uses: actions/setup-python@v5
171180
with:
172181
python-version: '3.11'
173182
- name: Build with JIT enabled and GIL disabled
174183
run: |
175-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
176-
export PATH="$(llvm-config-18 --bindir):$PATH"
184+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
185+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
177186
./configure --enable-experimental-jit --with-pydebug --disable-gil
178187
make all --jobs 4
179188
- name: Run tests

.github/workflows/reusable-macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ jobs:
6969
--fail-on-improvement
7070
--path-prefix="./"
7171
- name: Tests
72-
run: make test
72+
run: make ci

.github/workflows/reusable-ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ jobs:
105105
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw
106106
- name: Tests
107107
working-directory: ${{ env.CPYTHON_BUILDDIR }}
108-
run: xvfb-run make test
108+
run: xvfb-run make ci

Doc/README.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,5 @@ Bugs in the content should be reported to the
133133

134134
Bugs in the toolset should be reported to the tools themselves.
135135

136-
You can also send a mail to the Python Documentation Team at [email protected],
137-
and we will process your request as soon as possible.
138-
139-
If you want to help the Documentation Team, you are always welcome. Just send
140-
136+
To help with the documentation, or report any problems, please leave a message
137+
on `discuss.python.org <https://discuss.python.org/c/documentation>`_.

Doc/c-api/typeobj.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ slot typedefs
355355
+-----------------------------+-----------------------------+----------------------+
356356
| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * |
357357
| | | |
358-
| | :c:type:`PyObject` * | |
358+
| | :c:type:`PyTypeObject` * | |
359359
| | :c:type:`PyObject` * | |
360360
| | :c:type:`PyObject` * | |
361361
+-----------------------------+-----------------------------+----------------------+
@@ -2647,7 +2647,7 @@ Slot Type typedefs
26472647
26482648
See :c:member:`~PyTypeObject.tp_free`.
26492649

2650-
.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *)
2650+
.. c:type:: PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *)
26512651
26522652
See :c:member:`~PyTypeObject.tp_new`.
26532653

Doc/conf.py

+15-9
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313

1414
import sphinx
1515

16+
# Make our custom extensions available to Sphinx
1617
sys.path.append(os.path.abspath('tools/extensions'))
1718
sys.path.append(os.path.abspath('includes'))
1819

20+
# Python specific content from Doc/Tools/extensions/pyspecific.py
1921
from pyspecific import SOURCE_URI
2022

2123
# General configuration
2224
# ---------------------
2325

26+
# Our custom Sphinx extensions are found in Doc/Tools/extensions/
2427
extensions = [
2528
'audit_events',
2629
'availability',
@@ -54,7 +57,7 @@
5457
except ImportError:
5558
_tkinter = None
5659
# Treat warnings as errors, done here to prevent warnings in Sphinx code from
57-
# causing spurious test failures.
60+
# causing spurious CPython test failures.
5861
import warnings
5962
warnings.simplefilter('error')
6063
del warnings
@@ -80,10 +83,10 @@
8083
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
8184
"""
8285

83-
# There are two options for replacing |today|: either, you set today to some
84-
# non-false value, then it is used:
86+
# There are two options for replacing |today|. Either, you set today to some
87+
# non-false value and use it.
8588
today = ''
86-
# Else, today_fmt is used as the format for a strftime call.
89+
# Or else, today_fmt is used as the format for a strftime call.
8790
today_fmt = '%B %d, %Y'
8891

8992
# By default, highlight as Python 3.
@@ -95,10 +98,11 @@
9598
# Create table of contents entries for domain objects (e.g. functions, classes,
9699
# attributes, etc.). Default is True.
97100
toc_object_entries = True
101+
# Hide parents to tidy up long entries in sidebar
98102
toc_object_entries_show_parents = 'hide'
99103

100104
# Ignore any .rst files in the includes/ directory;
101-
# they're embedded in pages but not rendered individually.
105+
# they're embedded in pages but not rendered as individual pages.
102106
# Ignore any .rst files in the venv/ directory.
103107
exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst']
104108
venvdir = os.getenv('VENVDIR')
@@ -195,6 +199,7 @@
195199
('envvar', 'LC_TIME'),
196200
('envvar', 'LINES'),
197201
('envvar', 'LOGNAME'),
202+
('envvar', 'MANPAGER'),
198203
('envvar', 'PAGER'),
199204
('envvar', 'PATH'),
200205
('envvar', 'PATHEXT'),
@@ -329,8 +334,9 @@
329334
# Options for HTML output
330335
# -----------------------
331336

332-
# Use our custom theme.
337+
# Use our custom theme: https://github.com/python/python-docs-theme
333338
html_theme = 'python_docs_theme'
339+
# Location of overrides for theme templates and static files
334340
html_theme_path = ['tools']
335341
html_theme_options = {
336342
'collapsiblesidebar': True,
@@ -376,7 +382,7 @@
376382
html_last_updated_fmt, time.gmtime(html_time)
377383
)
378384

379-
# Path to find HTML templates.
385+
# Path to find HTML templates to override theme
380386
templates_path = ['tools/templates']
381387

382388
# Custom sidebar templates, filenames relative to this file.
@@ -621,8 +627,8 @@
621627
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
622628
}
623629

624-
# Options for c_annotations
625-
# -------------------------
630+
# Options for c_annotations extension
631+
# -----------------------------------
626632

627633
# Relative filename of the data files
628634
refcount_file = 'data/refcounts.dat'

Doc/deprecations/pending-removal-in-future.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Pending removal in future versions
44
The following APIs will be removed in the future,
55
although there is currently no date scheduled for their removal.
66

7+
* :mod:`argparse`:
8+
9+
* Nesting argument groups and nesting mutually exclusive
10+
groups are deprecated.
11+
* Passing the undocumented keyword argument *prefix_chars* to
12+
:meth:`~argparse.ArgumentParser.add_argument_group` is now
13+
deprecated.
14+
* The :class:`argparse.FileType` type converter is deprecated.
15+
16+
* :mod:`array`'s ``'u'`` format code (:gh:`57281`)
17+
718
* :mod:`builtins`:
819

920
* ``bool(NotImplemented)``.
@@ -33,17 +44,6 @@ although there is currently no date scheduled for their removal.
3344
as a single positional argument.
3445
(Contributed by Serhiy Storchaka in :gh:`109218`.)
3546

36-
* :mod:`argparse`:
37-
38-
* Nesting argument groups and nesting mutually exclusive
39-
groups are deprecated.
40-
* Passing the undocumented keyword argument *prefix_chars* to
41-
:meth:`~argparse.ArgumentParser.add_argument_group` is now
42-
deprecated.
43-
* The :class:`argparse.FileType` type converter is deprecated.
44-
45-
* :mod:`array`'s ``'u'`` format code (:gh:`57281`)
46-
4747
* :mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants are
4848
deprecated and replaced by :data:`calendar.JANUARY` and
4949
:data:`calendar.FEBRUARY`.

0 commit comments

Comments
 (0)