Skip to content

Commit be1ea22

Browse files
Merge branch 'main' into crash-bytesio-getbuffer-gc
2 parents 47f20ea + 4d5d9ac commit be1ea22

File tree

186 files changed

+8112
-3721
lines changed

Some content is hidden

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

186 files changed

+8112
-3721
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Lib/test/test_patma.py @brandtbucher
4040
Lib/test/test_peepholer.py @brandtbucher
4141
Lib/test/test_type_*.py @JelleZijlstra
4242
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
43+
Tools/c-analyzer/ @ericsnowcurrently
4344

4445
# Exceptions
4546
Lib/traceback.py @iritkatriel
@@ -188,6 +189,11 @@ Doc/c-api/stable.rst @encukou
188189
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
189190
Doc/howto/clinic.rst @erlend-aasland
190191

192+
# Subinterpreters
193+
Lib/test/support/interpreters/ @ericsnowcurrently
194+
Modules/_xx*interp*module.c @ericsnowcurrently
195+
Lib/test/test_interpreters/ @ericsnowcurrently
196+
191197
# WebAssembly
192198
/Tools/wasm/ @brettcannon
193199

.github/workflows/reusable-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Build CPython
19-
run: .\PCbuild\build.bat -e -d -p Win32 ${{ inputs.free-threaded && '--disable-gil' || '' }}
19+
run: .\PCbuild\build.bat -e -d -v -p Win32 ${{ inputs.free-threaded && '--disable-gil' || '' }}
2020
- name: Display build info
2121
run: .\python.bat -m test.pythoninfo
2222
- name: Tests
@@ -33,7 +33,7 @@ jobs:
3333
- name: Register MSVC problem matcher
3434
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3535
- name: Build CPython
36-
run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
36+
run: .\PCbuild\build.bat -e -d -v -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
3737
- name: Display build info
3838
run: .\python.bat -m test.pythoninfo
3939
- name: Tests
@@ -50,4 +50,4 @@ jobs:
5050
- name: Register MSVC problem matcher
5151
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
5252
- name: Build CPython
53-
run: .\PCbuild\build.bat -e -d -p arm64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
53+
run: .\PCbuild\build.bat -e -d -v -p arm64 ${{ inputs.free-threaded && '--disable-gil' || '' }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.2
3+
rev: v0.1.7
44
hooks:
55
- id: ruff
66
name: Run Ruff on Lib/test/
@@ -24,7 +24,7 @@ repos:
2424
types_or: [c, inc, python, rst]
2525

2626
- repo: https://github.com/sphinx-contrib/sphinx-lint
27-
rev: v0.8.1
27+
rev: v0.9.1
2828
hooks:
2929
- id: sphinx-lint
3030
args: [--enable=default-role]

Doc/c-api/exceptions.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,8 @@ Querying the error indicator
541541
542542
.. note::
543543
544-
This function *does not* implicitly set the ``__traceback__``
544+
This function *does not* implicitly set the
545+
:attr:`~BaseException.__traceback__`
545546
attribute on the exception value. If setting the traceback
546547
appropriately is desired, the following additional snippet is needed::
547548
@@ -753,7 +754,8 @@ Exception Objects
753754
.. c:function:: PyObject* PyException_GetTraceback(PyObject *ex)
754755
755756
Return the traceback associated with the exception as a new reference, as
756-
accessible from Python through :attr:`__traceback__`. If there is no
757+
accessible from Python through the :attr:`~BaseException.__traceback__`
758+
attribute. If there is no
757759
traceback associated, this returns ``NULL``.
758760
759761
@@ -767,8 +769,8 @@ Exception Objects
767769
768770
Return the context (another exception instance during whose handling *ex* was
769771
raised) associated with the exception as a new reference, as accessible from
770-
Python through :attr:`__context__`. If there is no context associated, this
771-
returns ``NULL``.
772+
Python through the :attr:`~BaseException.__context__` attribute.
773+
If there is no context associated, this returns ``NULL``.
772774
773775
774776
.. c:function:: void PyException_SetContext(PyObject *ex, PyObject *ctx)
@@ -782,7 +784,8 @@ Exception Objects
782784
783785
Return the cause (either an exception instance, or ``None``,
784786
set by ``raise ... from ...``) associated with the exception as a new
785-
reference, as accessible from Python through :attr:`__cause__`.
787+
reference, as accessible from Python through the
788+
:attr:`~BaseException.__cause__` attribute.
786789
787790
788791
.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *cause)
@@ -791,7 +794,8 @@ Exception Objects
791794
it. There is no type check to make sure that *cause* is either an exception
792795
instance or ``None``. This steals a reference to *cause*.
793796
794-
:attr:`__suppress_context__` is implicitly set to ``True`` by this function.
797+
The :attr:`~BaseException.__suppress_context__` attribute is implicitly set
798+
to ``True`` by this function.
795799
796800
797801
.. c:function:: PyObject* PyException_GetArgs(PyObject *ex)

Doc/c-api/function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ There are a few functions specific to Python functions.
3535
must be a dictionary with the global variables accessible to the function.
3636
3737
The function's docstring and name are retrieved from the code object.
38-
:func:`~function.__module__`
38+
:attr:`~function.__module__`
3939
is retrieved from *globals*. The argument defaults, annotations and closure are
4040
set to ``NULL``. :attr:`~function.__qualname__` is set to the same value as
4141
the code object's :attr:`~codeobject.co_qualname` field.

Doc/library/asyncio-eventloop.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ Creating network servers
671671
flags=socket.AI_PASSIVE, \
672672
sock=None, backlog=100, ssl=None, \
673673
reuse_address=None, reuse_port=None, \
674+
keep_alive=None, \
674675
ssl_handshake_timeout=None, \
675676
ssl_shutdown_timeout=None, \
676677
start_serving=True)
@@ -735,6 +736,13 @@ Creating network servers
735736
set this flag when being created. This option is not supported on
736737
Windows.
737738

739+
* *keep_alive* set to ``True`` keeps connections active by enabling the
740+
periodic transmission of messages.
741+
742+
.. versionchanged:: 3.13
743+
744+
Added the *keep_alive* parameter.
745+
738746
* *ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait
739747
for the TLS handshake to complete before aborting the connection.
740748
``60.0`` seconds if ``None`` (default).

Doc/library/bdb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ The :mod:`bdb` module also defines two classes:
294294
.. method:: set_quit()
295295

296296
Set the :attr:`quitting` attribute to ``True``. This raises :exc:`BdbQuit` in
297-
the next call to one of the :meth:`dispatch_\*` methods.
297+
the next call to one of the :meth:`!dispatch_\*` methods.
298298

299299

300300
Derived classes and clients can call the following methods to manipulate

Doc/library/cmd.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ A :class:`Cmd` instance has the following methods:
8383

8484
This method will return when the :meth:`postcmd` method returns a true value.
8585
The *stop* argument to :meth:`postcmd` is the return value from the command's
86-
corresponding :meth:`do_\*` method.
86+
corresponding :meth:`!do_\*` method.
8787

8888
If completion is enabled, completing commands will be done automatically, and
8989
completing of commands args is done by calling :meth:`complete_foo` with
@@ -98,7 +98,7 @@ A :class:`Cmd` instance has the following methods:
9898
:meth:`help_bar`, and if that is not present, prints the docstring of
9999
:meth:`do_bar`, if available. With no argument, :meth:`do_help` lists all
100100
available help topics (that is, all commands with corresponding
101-
:meth:`help_\*` methods or commands that have docstrings), and also lists any
101+
:meth:`!help_\*` methods or commands that have docstrings), and also lists any
102102
undocumented commands.
103103

104104

@@ -108,7 +108,7 @@ A :class:`Cmd` instance has the following methods:
108108
This may be overridden, but should not normally need to be; see the
109109
:meth:`precmd` and :meth:`postcmd` methods for useful execution hooks. The
110110
return value is a flag indicating whether interpretation of commands by the
111-
interpreter should stop. If there is a :meth:`do_\*` method for the command
111+
interpreter should stop. If there is a :meth:`!do_\*` method for the command
112112
*str*, the return value of that method is returned, otherwise the return value
113113
from the :meth:`default` method is returned.
114114

@@ -128,7 +128,7 @@ A :class:`Cmd` instance has the following methods:
128128
.. method:: Cmd.completedefault(text, line, begidx, endidx)
129129

130130
Method called to complete an input line when no command-specific
131-
:meth:`complete_\*` method is available. By default, it returns an empty list.
131+
:meth:`!complete_\*` method is available. By default, it returns an empty list.
132132

133133

134134
.. method:: Cmd.columnize(list, displaywidth=80)
@@ -209,14 +209,14 @@ Instances of :class:`Cmd` subclasses have some public instance variables:
209209
.. attribute:: Cmd.misc_header
210210

211211
The header to issue if the help output has a section for miscellaneous help
212-
topics (that is, there are :meth:`help_\*` methods without corresponding
213-
:meth:`do_\*` methods).
212+
topics (that is, there are :meth:`!help_\*` methods without corresponding
213+
:meth:`!do_\*` methods).
214214

215215

216216
.. attribute:: Cmd.undoc_header
217217

218218
The header to issue if the help output has a section for undocumented commands
219-
(that is, there are :meth:`do_\*` methods without corresponding :meth:`help_\*`
219+
(that is, there are :meth:`!do_\*` methods without corresponding :meth:`!help_\*`
220220
methods).
221221

222222

Doc/library/configparser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ ConfigParser Objects
955955
When *converters* is given, it should be a dictionary where each key
956956
represents the name of a type converter and each value is a callable
957957
implementing the conversion from string to the desired datatype. Every
958-
converter gets its own corresponding :meth:`get*()` method on the parser
958+
converter gets its own corresponding :meth:`!get*()` method on the parser
959959
object and section proxies.
960960

961961
.. versionchanged:: 3.1

Doc/library/csv.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ An example for :class:`Sniffer` use::
309309
# ... process CSV file contents here ...
310310

311311

312+
.. _csv-constants:
313+
312314
The :mod:`csv` module defines the following constants:
313315

314316
.. data:: QUOTE_ALL
@@ -432,8 +434,8 @@ Dialects support the following attributes:
432434
.. attribute:: Dialect.quoting
433435

434436
Controls when quotes should be generated by the writer and recognised by the
435-
reader. It can take on any of the :const:`QUOTE_\*` constants (see section
436-
:ref:`csv-contents`) and defaults to :const:`QUOTE_MINIMAL`.
437+
reader. It can take on any of the :ref:`QUOTE_\* constants <csv-constants>`
438+
and defaults to :const:`QUOTE_MINIMAL`.
437439

438440

439441
.. attribute:: Dialect.skipinitialspace

0 commit comments

Comments
 (0)