Skip to content

Commit 443a924

Browse files
Merge branch 'main' into poptimize
2 parents 01a8e2a + d7dbde8 commit 443a924

File tree

206 files changed

+3468
-1856
lines changed

Some content is hidden

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

206 files changed

+3468
-1856
lines changed

.github/CODEOWNERS

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@
44
# It uses the same pattern rule for gitignore file
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

7-
# GitHub
7+
# Azure Pipelines
8+
.azure-pipelines/ @AA-Turner
9+
10+
# GitHub & related scripts
811
.github/** @ezio-melotti @hugovk @AA-Turner
12+
Tools/build/compute-changes.py @AA-Turner
13+
Tools/build/verify_ensurepip_wheels.py @AA-Turner
914

1015
# pre-commit
11-
.pre-commit-config.yaml @hugovk @AlexWaygood
16+
.pre-commit-config.yaml @hugovk
1217
.ruff.toml @hugovk @AlexWaygood @AA-Turner
1318

14-
# Build system
15-
configure* @erlend-aasland @corona10
16-
Makefile.pre.in @erlend-aasland
17-
Modules/Setup* @erlend-aasland
19+
# Build system (autotools)
20+
configure* @erlend-aasland @corona10 @AA-Turner
21+
Makefile.pre.in @erlend-aasland @AA-Turner
22+
Modules/Setup* @erlend-aasland @AA-Turner
23+
Tools/build/regen-configure.sh @AA-Turner
1824

1925
# argparse
2026
**/*argparse* @savannahostrowski
@@ -67,6 +73,7 @@ Doc/make.bat @AA-Turner @hugovk
6773
Doc/requirements.txt @AA-Turner @hugovk
6874
Doc/_static/** @AA-Turner @hugovk
6975
Doc/tools/** @AA-Turner @hugovk
76+
.readthedocs.yml @AA-Turner
7077

7178
# runtime state/lifecycle
7279
**/*pylifecycle* @ericsnowcurrently @ZeroIntensity
@@ -155,6 +162,10 @@ Doc/c-api/module.rst @ericsnowcurrently
155162
**/*importlib/resources/* @jaraco @warsaw @FFY00
156163
**/*importlib/metadata/* @jaraco @warsaw
157164

165+
# Calendar
166+
Lib/calendar.py @AA-Turner
167+
Lib/test/test_calendar.py @AA-Turner
168+
158169
# Dates and times
159170
**/*datetime* @pganssle @abalkin
160171
**/*str*time* @pganssle @abalkin
@@ -205,6 +216,11 @@ Lib/test/test_ast/ @eclips4 @tomasr8
205216
# multiprocessing
206217
**/*multiprocessing* @gpshead
207218

219+
# pydoc
220+
Lib/pydoc.py @AA-Turner
221+
Lib/pydoc_data/ @AA-Turner
222+
Lib/test/test_pydoc/ @AA-Turner
223+
208224
# SQLite 3
209225
**/*sqlite* @berkerpeksag @erlend-aasland
210226

@@ -217,6 +233,11 @@ Lib/test/test_ast/ @eclips4 @tomasr8
217233
**/*pdb* @gaogaotiantian
218234
**/*bdb* @gaogaotiantian
219235

236+
# types
237+
Lib/test/test_types.py @AA-Turner
238+
Lib/types.py @AA-Turner
239+
Modules/_typesmodule.c @AA-Turner
240+
220241
# Limited C API & stable ABI
221242
Tools/build/stable_abi.py @encukou
222243
Misc/stable_abi.toml @encukou
@@ -234,6 +255,11 @@ Doc/c-api/stable.rst @encukou
234255
/Tools/msi/ @python/windows-team
235256
/Tools/nuget/ @python/windows-team
236257

258+
# Zstandard
259+
Lib/compression/zstd/ @AA-Turner
260+
Lib/test/test_zstd.py @AA-Turner
261+
Modules/_zstd/ @AA-Turner
262+
237263
# Misc
238264
**/*itertools* @rhettinger
239265
**/*collections* @rhettinger
@@ -266,6 +292,9 @@ Doc/c-api/stable.rst @encukou
266292

267293
**/*cjkcodecs* @corona10
268294

295+
# Patchcheck
296+
Tools/patchcheck/ @AA-Turner
297+
269298
# macOS
270299
/Mac/ @python/macos-team
271300
**/*osx_support* @python/macos-team
@@ -277,9 +306,9 @@ Doc/c-api/stable.rst @encukou
277306
**/*zipfile/_path/* @jaraco
278307

279308
# Argument Clinic
280-
/Tools/clinic/** @erlend-aasland
281-
/Lib/test/test_clinic.py @erlend-aasland
282-
Doc/howto/clinic.rst @erlend-aasland
309+
/Tools/clinic/** @erlend-aasland @AA-Turner
310+
/Lib/test/test_clinic.py @erlend-aasland @AA-Turner
311+
Doc/howto/clinic.rst @erlend-aasland @AA-Turner
283312

284313
# Subinterpreters
285314
**/*interpreteridobject.* @ericsnowcurrently
@@ -323,6 +352,7 @@ Lib/test/test_configparser.py @jaraco
323352

324353
# Doc sections
325354
Doc/reference/ @willingc @AA-Turner
355+
Doc/whatsnew/ @AA-Turner
326356

327357
**/*weakref* @kumaraditya303
328358

@@ -336,7 +366,7 @@ Modules/_xxtestfuzz/ @ammaraskar
336366
# t-strings
337367
**/*interpolationobject* @lysnikolaou
338368
**/*templateobject* @lysnikolaou
339-
**/*templatelib* @lysnikolaou
369+
**/*templatelib* @lysnikolaou @AA-Turner
340370
**/*tstring* @lysnikolaou
341371

342372
# Remote debugging
@@ -346,3 +376,6 @@ Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
346376

347377
# gettext
348378
**/*gettext* @tomasr8
379+
380+
# Internal Docs
381+
InternalDocs/ @AA-Turner

.github/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_
7+
- `Buildbot status overview <https://buildbot.python.org/#/release_status>`_
88

99
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_
1010

.github/workflows/reusable-docs.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,6 @@ jobs:
7575
--fail-if-regression \
7676
--fail-if-improved \
7777
--fail-if-new-news-nit
78-
- name: 'Build EPUB documentation'
79-
continue-on-error: true
80-
run: |
81-
set -Eeuo pipefail
82-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet" epub
83-
pip install epubcheck
84-
epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt
85-
- name: 'Check for fatal errors in EPUB'
86-
if: github.event_name == 'pull_request'
87-
continue-on-error: true # until gh-136155 is fixed
88-
run: |
89-
python Doc/tools/check-epub.py
9078
9179
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9280
doctest:
@@ -114,3 +102,30 @@ jobs:
114102
# Use "xvfb-run" since some doctest tests open GUI windows
115103
- name: 'Run documentation doctest'
116104
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest
105+
106+
check-epub:
107+
name: 'Check EPUB'
108+
runs-on: ubuntu-latest
109+
timeout-minutes: 30
110+
steps:
111+
- uses: actions/checkout@v4
112+
with:
113+
persist-credentials: false
114+
- name: 'Set up Python'
115+
uses: actions/setup-python@v5
116+
with:
117+
python-version: '3'
118+
cache: 'pip'
119+
cache-dependency-path: 'Doc/requirements.txt'
120+
- name: 'Install build dependencies'
121+
run: |
122+
make -C Doc/ venv
123+
python -m pip install epubcheck
124+
- name: 'Build EPUB documentation'
125+
run: make -C Doc/ PYTHON=../python epub
126+
- name: 'Run epubcheck'
127+
continue-on-error: true
128+
run: epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt
129+
- run: cat Doc/epubcheck.txt
130+
- name: 'Check for fatal errors in EPUB'
131+
run: python Doc/tools/check-epub.py

.well-known/funding-manifest-urls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://www.python.org/funding.json

Android/android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def unpack_deps(host, prefix_dir):
187187
os.chdir(prefix_dir)
188188
deps_url = "https://github.com/beeware/cpython-android-source-deps/releases/download"
189189
for name_ver in ["bzip2-1.0.8-3", "libffi-3.4.4-3", "openssl-3.0.15-4",
190-
"sqlite-3.49.1-0", "xz-5.4.6-1", "zstd-1.5.7-1"]:
190+
"sqlite-3.50.4-0", "xz-5.4.6-1", "zstd-1.5.7-1"]:
191191
filename = f"{name_ver}-{host}.tar.gz"
192192
download(f"{deps_url}/{name_ver}/{filename}")
193193
shutil.unpack_archive(filename)

Doc/c-api/complex.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,36 @@ pointers. This is consistent throughout the API.
4343
Return the sum of two complex numbers, using the C :c:type:`Py_complex`
4444
representation.
4545
46+
.. deprecated:: 3.15
47+
This function is :term:`soft deprecated`.
48+
4649
4750
.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
4851
4952
Return the difference between two complex numbers, using the C
5053
:c:type:`Py_complex` representation.
5154
55+
.. deprecated:: 3.15
56+
This function is :term:`soft deprecated`.
57+
5258
5359
.. c:function:: Py_complex _Py_c_neg(Py_complex num)
5460
5561
Return the negation of the complex number *num*, using the C
5662
:c:type:`Py_complex` representation.
5763
64+
.. deprecated:: 3.15
65+
This function is :term:`soft deprecated`.
66+
5867
5968
.. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)
6069
6170
Return the product of two complex numbers, using the C :c:type:`Py_complex`
6271
representation.
6372
73+
.. deprecated:: 3.15
74+
This function is :term:`soft deprecated`.
75+
6476
6577
.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
6678
@@ -70,6 +82,9 @@ pointers. This is consistent throughout the API.
7082
If *divisor* is null, this method returns zero and sets
7183
:c:data:`errno` to :c:macro:`!EDOM`.
7284
85+
.. deprecated:: 3.15
86+
This function is :term:`soft deprecated`.
87+
7388
7489
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
7590
@@ -81,6 +96,19 @@ pointers. This is consistent throughout the API.
8196
8297
Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
8398
99+
.. deprecated:: 3.15
100+
This function is :term:`soft deprecated`.
101+
102+
103+
.. c:function:: double _Py_c_abs(Py_complex num)
104+
105+
Return the absolute value of the complex number *num*.
106+
107+
Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
108+
109+
.. deprecated:: 3.15
110+
This function is :term:`soft deprecated`.
111+
84112
85113
Complex Numbers as Python Objects
86114
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,6 +118,16 @@ Complex Numbers as Python Objects
90118
91119
This subtype of :c:type:`PyObject` represents a Python complex number object.
92120
121+
.. c:member:: Py_complex cval
122+
123+
The complex number value, using the C :c:type:`Py_complex` representation.
124+
125+
.. deprecated-removed:: next 3.20
126+
Use :c:func:`PyComplex_AsCComplex` and
127+
:c:func:`PyComplex_FromCComplex` to convert a
128+
Python complex number to/from the C :c:type:`Py_complex`
129+
representation.
130+
93131
94132
.. c:var:: PyTypeObject PyComplex_Type
95133

Doc/c-api/long.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
372372
Set *\*value* to a signed C :c:expr:`int32_t` or :c:expr:`int64_t`
373373
representation of *obj*.
374374
375+
If *obj* is not an instance of :c:type:`PyLongObject`, first call its
376+
:meth:`~object.__index__` method (if present) to convert it to a
377+
:c:type:`PyLongObject`.
378+
375379
If the *obj* value is out of range, raise an :exc:`OverflowError`.
376380
377381
Set *\*value* and return ``0`` on success.

Doc/c-api/object.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Object Protocol
197197
in favour of using :c:func:`PyObject_DelAttr`, but there are currently no
198198
plans to remove it.
199199
200-
The function must not be called with ``NULL`` *v* and an an exception set.
200+
The function must not be called with a ``NULL`` *v* and an exception set.
201201
This case can arise from forgetting ``NULL`` checks and would delete the
202202
attribute.
203203
@@ -214,7 +214,7 @@ Object Protocol
214214
If *v* is ``NULL``, the attribute is deleted, but this feature is
215215
deprecated in favour of using :c:func:`PyObject_DelAttrString`.
216216
217-
The function must not be called with ``NULL`` *v* and an an exception set.
217+
The function must not be called with a ``NULL`` *v* and an exception set.
218218
This case can arise from forgetting ``NULL`` checks and would delete the
219219
attribute.
220220

Doc/conf.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,11 @@
567567
'image': '_static/og-image.png',
568568
'line_color': '#3776ab',
569569
}
570-
if 'builder_html' in tags: # noqa: F821
571-
ogp_custom_meta_tags = [
572-
'<meta name="theme-color" content="#3776ab">',
573-
]
574-
if 'create-social-cards' not in tags: # noqa: F821
575-
# Define a static preview image when not creating social cards
576-
ogp_image = '_static/og-image.png'
577-
ogp_custom_meta_tags += [
578-
'<meta property="og:image:width" content="200">',
579-
'<meta property="og:image:height" content="200">',
580-
]
570+
ogp_custom_meta_tags = ('<meta name="theme-color" content="#3776ab">',)
571+
if 'create-social-cards' not in tags: # noqa: F821
572+
# Define a static preview image when not creating social cards
573+
ogp_image = '_static/og-image.png'
574+
ogp_custom_meta_tags += (
575+
'<meta property="og:image:width" content="200">',
576+
'<meta property="og:image:height" content="200">',
577+
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Pending removal in Python 3.20
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`).
5+
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
6+
to convert a Python complex number to/from the C :c:type:`Py_complex`
7+
representation.

0 commit comments

Comments
 (0)