Skip to content

Commit 0d91be9

Browse files
Merge branch 'main' into feat/gc-monitor-get
2 parents 729ca2c + 0fcf2b7 commit 0d91be9

195 files changed

Lines changed: 16416 additions & 2734 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.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ jobs:
354354
with:
355355
persist-credentials: false
356356
- name: Build and test
357-
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
357+
run: python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
358358

359359
build-ios:
360360
name: iOS

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.cover
66
*.iml
77
*.o
8+
*.o.tmp
89
*.lto
910
*.a
1011
*.so

Doc/c-api/module.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,12 @@ remove it.
685685
Usually, there is only one variable of this type for each extension module
686686
defined this way.
687687
688+
The struct, including all members, is part of the
689+
:ref:`Stable ABI <stable-abi>` for non-free-threaded builds (``abi3``).
690+
In the Stable ABI for free-threaded builds (``abi3t``),
691+
this struct is opaque, and unusable in practice; see :ref:`pymoduledef_slot`
692+
for a replacement.
693+
688694
.. c:member:: PyModuleDef_Base m_base
689695
690696
Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`:
@@ -695,6 +701,11 @@ remove it.
695701
696702
The type of :c:member:`!PyModuleDef.m_base`.
697703

704+
The struct is part of the :ref:`Stable ABI <stable-abi>` for
705+
non-free-threaded builds (``abi3``).
706+
In the Stable ABI for Free-Threaded Builds
707+
(``abi3t``), this struct is opaque, and unusable in practice.
708+
698709
.. c:macro:: PyModuleDef_HEAD_INIT
699710
700711
The required initial value for :c:member:`!PyModuleDef.m_base`.

Doc/c-api/stable.rst

Lines changed: 173 additions & 97 deletions
Large diffs are not rendered by default.

Doc/c-api/structures.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ under :ref:`reference counting <countingrefs>`.
3333
The members must not be accessed directly; instead use macros such as
3434
:c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`.
3535

36+
In the :ref:`Stable ABI <stable-abi>` for Free-Threaded Builds (``abi3t``),
37+
this struct is opaque; its size and layout may change between
38+
Python versions.
39+
In Stable ABI for non-free-threaded builds (``abi3``), the
40+
:c:member:`!ob_refcnt` and :c:member:`!ob_type` fields are available,
41+
but using them directly is discouraged.
42+
3643
.. c:member:: Py_ssize_t ob_refcnt
3744
3845
The object's reference count, as returned by :c:macro:`Py_REFCNT`.
@@ -72,6 +79,19 @@ under :ref:`reference counting <countingrefs>`.
7279
instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` and
7380
:c:macro:`Py_TYPE`.
7481

82+
In the :ref:`Stable ABI <stable-abi>` for Free-Threaded Builds (``abi3t``),
83+
this struct is opaque; its size and layout may change between
84+
Python versions.
85+
In Stable ABI for non-free-threaded builds (``abi3``), the
86+
:c:member:`!ob_base` and :c:member:`!ob_size` fields are available,
87+
but using them directly is discouraged.
88+
89+
.. c:member:: PyObject ob_base
90+
91+
Common object header.
92+
Typically, this field is not accessed directly; instead
93+
:c:type:`!PyVarObject` can be cast to :c:type:`PyObject`.
94+
7595
.. c:member:: Py_ssize_t ob_size
7696
7797
A size field, whose contents should be considered an object's internal

Doc/data/stable_abi.dat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Deprecations
1515

1616
.. include:: pending-removal-in-future.rst
1717

18+
.. include:: soft-deprecations.rst
19+
1820
C API deprecations
1921
------------------
2022

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Pending removal in Python 3.17
22
------------------------------
33

4+
* :mod:`datetime`:
5+
6+
* :meth:`~datetime.datetime.strptime` calls using a format string containing
7+
``%e`` (day of month) without a year.
8+
This has been deprecated since Python 3.15.
9+
(Contributed by Stan Ulbrych in :gh:`70647`.)
10+
11+
412
* :mod:`collections.abc`:
513

614
- :class:`collections.abc.ByteString` is scheduled for removal in Python 3.17.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Soft deprecations
2+
-----------------
3+
4+
There are no plans to remove :term:`soft deprecated` APIs.
5+
6+
* :func:`re.match` and :meth:`re.Pattern.match` are now
7+
:term:`soft deprecated` in favor of the new :func:`re.prefixmatch` and
8+
:meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate,
9+
more explicit names. These are intended to be used to alleviate confusion
10+
around what *match* means by following the Zen of Python's *"Explicit is
11+
better than implicit"* mantra. Most other language regular expression
12+
libraries use an API named *match* to mean what Python has always called
13+
*search*.
14+
15+
We **do not** plan to remove the older :func:`!match` name, as it has been
16+
used in code for over 30 years. Code supporting older versions of Python
17+
should continue to use :func:`!match`, while new code should prefer
18+
:func:`!prefixmatch`. See :ref:`prefixmatch-vs-match`.
19+
20+
(Contributed by Gregory P. Smith in :gh:`86519` and
21+
Hugo van Kemenade in :gh:`148100`.)

Doc/howto/logging-cookbook.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3877,7 +3877,7 @@ subclassed handler which looks something like this::
38773877
def format(self, record):
38783878
version = 1
38793879
asctime = dt.datetime.fromtimestamp(record.created).isoformat()
3880-
m = self.tz_offset.match(time.strftime('%z'))
3880+
m = self.tz_offset.prefixmatch(time.strftime('%z'))
38813881
has_offset = False
38823882
if m and time.timezone:
38833883
hrs, mins = m.groups()

0 commit comments

Comments
 (0)