Skip to content

Commit 776e2b7

Browse files
committed
Merge in the main branch
2 parents baa8446 + a553065 commit 776e2b7

File tree

67 files changed

+3278
-1200
lines changed

Some content is hidden

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

67 files changed

+3278
-1200
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ jobs:
270270
fail-fast: false
271271
matrix:
272272
os: [ubuntu-24.04]
273-
openssl_ver: [3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
273+
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
274+
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
275+
# supported by important vendors such as AWS-LC.
276+
openssl_ver: [1.1.1w, 3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
274277
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
275278
env:
276279
OPENSSL_VER: ${{ matrix.openssl_ver }}

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ jobs:
114114
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
115115
brew install llvm@${{ matrix.llvm }}
116116
export SDKROOT="$(xcrun --show-sdk-path)"
117-
export PATH="/usr/local/opt/llvm/bin:$PATH"
118-
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
117+
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
118+
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
119119
CC=clang-20 ./configure --with-tail-call-interp
120120
make all --jobs 4
121121
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ iOS/testbed/Python.xcframework/ios-*/lib
8080
iOS/testbed/Python.xcframework/ios-*/Python.framework
8181
iOS/testbed/iOSTestbed.xcodeproj/project.xcworkspace
8282
iOS/testbed/iOSTestbed.xcodeproj/xcuserdata
83-
iOS/testbed/iOSTestbed.xcodeproj/xcshareddata
8483
Mac/Makefile
8584
Mac/PythonLauncher/Info.plist
8685
Mac/PythonLauncher/Makefile

Doc/c-api/typeobj.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,19 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12861286
:c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass.
12871287

12881288

1289+
.. c:macro:: Py_TPFLAGS_PREHEADER
1290+
1291+
These bits indicate that the VM will manage some fields by storing them
1292+
before the object. Currently, this macro is equivalent to
1293+
:c:expr:`Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF`.
1294+
1295+
This macro value relies on the implementation of the VM, so its value is not
1296+
stable and may change in a future version. Prefer using individual
1297+
flags instead.
1298+
1299+
.. versionadded:: 3.12
1300+
1301+
12891302
.. c:macro:: Py_TPFLAGS_ITEMS_AT_END
12901303
12911304
Only usable with variable-size types, i.e. ones with non-zero

Doc/extending/extending.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,14 @@ references to all its items, so when item 1 is replaced, it has to dispose of
10841084
the original item 1. Now let's suppose the original item 1 was an instance of a
10851085
user-defined class, and let's further suppose that the class defined a
10861086
:meth:`!__del__` method. If this class instance has a reference count of 1,
1087-
disposing of it will call its :meth:`!__del__` method.
1087+
disposing of it will call its :meth:`!__del__` method. Internally,
1088+
:c:func:`PyList_SetItem` calls :c:func:`Py_DECREF` on the replaced item,
1089+
which invokes replaced item's corresponding
1090+
:c:member:`~PyTypeObject.tp_dealloc` function. During
1091+
deallocation, :c:member:`~PyTypeObject.tp_dealloc` calls
1092+
:c:member:`~PyTypeObject.tp_finalize`, which is mapped to the
1093+
:meth:`!__del__` method for class instances (see :pep:`442`). This entire
1094+
sequence happens synchronously within the :c:func:`PyList_SetItem` call.
10881095

10891096
Since it is written in Python, the :meth:`!__del__` method can execute arbitrary
10901097
Python code. Could it perhaps do something to invalidate the reference to

Doc/library/csv.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The :mod:`csv` module defines the following functions:
113113
spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])
114114

115115

116-
.. function:: register_dialect(name[, dialect[, **fmtparams]])
116+
.. function:: register_dialect(name, /, dialect='excel', **fmtparams)
117117

118118
Associate *dialect* with *name*. *name* must be a string. The
119119
dialect can be specified either by passing a sub-class of :class:`Dialect`, or
@@ -139,7 +139,8 @@ The :mod:`csv` module defines the following functions:
139139
Return the names of all registered dialects.
140140

141141

142-
.. function:: field_size_limit([new_limit])
142+
.. function:: field_size_limit()
143+
field_size_limit(new_limit)
143144

144145
Returns the current maximum field size allowed by the parser. If *new_limit* is
145146
given, this becomes the new limit.
@@ -526,7 +527,7 @@ out surrounded by parens. This may cause some problems for other programs which
526527
read CSV files (assuming they support complex numbers at all).
527528

528529

529-
.. method:: csvwriter.writerow(row)
530+
.. method:: csvwriter.writerow(row, /)
530531

531532
Write the *row* parameter to the writer's file object, formatted according
532533
to the current :class:`Dialect`. Return the return value of the call to the
@@ -535,7 +536,7 @@ read CSV files (assuming they support complex numbers at all).
535536
.. versionchanged:: 3.5
536537
Added support of arbitrary iterables.
537538

538-
.. method:: csvwriter.writerows(rows)
539+
.. method:: csvwriter.writerows(rows, /)
539540

540541
Write all elements in *rows* (an iterable of *row* objects as described
541542
above) to the writer's file object, formatted according to the current

Doc/library/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ the following methods and attributes:
770770

771771
.. method:: window.attron(attr)
772772

773-
Add attribute *attr* from the "background" set applied to all writes to the
773+
Add attribute *attr* to the "background" set applied to all writes to the
774774
current window.
775775

776776

0 commit comments

Comments
 (0)