Skip to content

Commit 92417c2

Browse files
authored
Merge branch 'main' into gh-113093
2 parents 790766e + fea2a57 commit 92417c2

266 files changed

Lines changed: 7660 additions & 3402 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/documentation-links.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/posix-deps-apt.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ apt-get -yq --no-install-recommends install \
2626
xvfb \
2727
zlib1g-dev
2828

29-
# Workaround missing libmpdec-dev on ubuntu 24.04:
30-
# https://launchpad.net/~ondrej/+archive/ubuntu/php
31-
# https://deb.sury.org/
32-
sudo add-apt-repository ppa:ondrej/php
33-
apt-get update
34-
apt-get -yq --no-install-recommends install libmpdec-dev
29+
# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal
30+
# from source. ppa:ondrej/php (launchpad.net) are unreliable
31+
# (https://status.canonical.com) so fetch the tarball directly
32+
# from the upstream host.
33+
# https://www.bytereef.org/mpdecimal/
34+
MPDECIMAL_VERSION=4.0.1
35+
curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \
36+
| tar -xz -C /tmp
37+
(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \
38+
&& ./configure --prefix=/usr/local \
39+
&& make -j"$(nproc)" \
40+
&& make install)
41+
ldconfig

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
python-version: '3'
5858
cache: 'pip'
59-
cache-dependency-path: 'Doc/requirements.txt'
59+
cache-dependency-path: 'Doc/pylock.toml'
6060
- name: 'Install build dependencies'
6161
run: make -C Doc/ venv
6262

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ JOBS = auto
1313
PAPER =
1414
SOURCES =
1515
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
16-
REQUIREMENTS = requirements.txt
16+
REQUIREMENTS = pylock.toml
1717
SPHINXERRORHANDLING = --fail-on-warning
1818

1919
# Internal variables.

Doc/c-api/concrete.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Other Objects
112112
picklebuffer.rst
113113
weakref.rst
114114
capsule.rst
115+
sentinel.rst
115116
frame.rst
116117
gen.rst
117118
coro.rst

Doc/c-api/sentinel.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. highlight:: c
2+
3+
.. _sentinelobjects:
4+
5+
Sentinel objects
6+
----------------
7+
8+
.. c:var:: PyTypeObject PySentinel_Type
9+
10+
This instance of :c:type:`PyTypeObject` represents the Python
11+
:class:`sentinel` type. This is the same object as :class:`sentinel`.
12+
13+
.. versionadded:: next
14+
15+
.. c:function:: int PySentinel_Check(PyObject *o)
16+
17+
Return true if *o* is a :class:`sentinel` object. The :class:`sentinel` type
18+
does not allow subclasses, so this check is exact.
19+
20+
.. versionadded:: next
21+
22+
.. c:function:: PyObject* PySentinel_New(const char *name, const char *module_name)
23+
24+
Return a new :class:`sentinel` object with :attr:`~sentinel.__name__` set to
25+
*name* and :attr:`~sentinel.__module__` set to *module_name*.
26+
*name* must not be ``NULL``. If *module_name* is ``NULL``, :attr:`~sentinel.__module__`
27+
is set to ``None``.
28+
Return ``NULL`` with an exception set on failure.
29+
30+
For pickling to work, *module_name* must be the name of an importable
31+
module, and the sentinel must be accessible from that module under a
32+
path matching *name*. Pickle treats *name* as a global variable name
33+
in *module_name* (see :meth:`object.__reduce__`).
34+
35+
.. versionadded:: next

Doc/data/refcounts.dat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,10 @@ PySeqIter_Check:PyObject *:op:0:
20372037
PySeqIter_New:PyObject*::+1:
20382038
PySeqIter_New:PyObject*:seq:0:
20392039

2040+
PySentinel_New:PyObject*::+1:
2041+
PySentinel_New:const char*:name::
2042+
PySentinel_New:const char*:module_name::
2043+
20402044
PySequence_Check:int:::
20412045
PySequence_Check:PyObject*:o:0:
20422046

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Pending removal in Python 3.15
6060

6161
* :mod:`types`:
6262

63-
* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
63+
* :class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was
6464
deprecated in :pep:`626`
6565
since 3.10 and was planned to be removed in 3.12,
6666
but it only got a proper :exc:`DeprecationWarning` in 3.12.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ although there is currently no date scheduled for their removal.
4747

4848
* :mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)
4949

50-
* :attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method
50+
* :attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method
5151
instead.
5252

5353
* :mod:`datetime`:

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1924,7 +1924,7 @@ correctly using identity tests:
19241924

19251925
.. code-block:: python
19261926
1927-
_sentinel = object()
1927+
_sentinel = sentinel('_sentinel')
19281928
19291929
def pop(self, key, default=_sentinel):
19301930
if key in self:

0 commit comments

Comments
 (0)