Skip to content

Commit

Permalink
Merge branch 'main' into keep-trailing-slash-wip3
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 17, 2023
2 parents 9539c60 + 2f0ec7f commit 14a9635
Show file tree
Hide file tree
Showing 273 changed files with 16,390 additions and 10,518 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Include/internal/pycore_ast_state.h generated
Include/internal/pycore_opcode.h generated
Include/internal/pycore_opcode_metadata.h generated
Include/internal/pycore_*_generated.h generated
Include/internal/pycore_uop_ids.h generated
Include/opcode.h generated
Include/opcode_ids.h generated
Include/token.h generated
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Lib/test/test_patma.py @brandtbucher
Lib/test/test_peepholer.py @brandtbucher
Lib/test/test_type_*.py @JelleZijlstra
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
Tools/c-analyzer/ @ericsnowcurrently

# Exceptions
Lib/traceback.py @iritkatriel
Expand Down Expand Up @@ -188,6 +189,11 @@ Doc/c-api/stable.rst @encukou
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
Doc/howto/clinic.rst @erlend-aasland

# Subinterpreters
Lib/test/support/interpreters/ @ericsnowcurrently
Modules/_xx*interp*module.c @ericsnowcurrently
Lib/test/test_interpreters/ @ericsnowcurrently

# WebAssembly
/Tools/wasm/ @brettcannon

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build CPython
run: .\PCbuild\build.bat -e -d -p Win32 ${{ inputs.free-threaded && '--disable-gil' || '' }}
run: .\PCbuild\build.bat -e -d -v -p Win32 ${{ inputs.free-threaded && '--disable-gil' || '' }}
- name: Display build info
run: .\python.bat -m test.pythoninfo
- name: Tests
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Register MSVC problem matcher
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Build CPython
run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
run: .\PCbuild\build.bat -e -d -v -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
- name: Display build info
run: .\python.bat -m test.pythoninfo
- name: Tests
Expand All @@ -50,4 +50,4 @@ jobs:
- name: Register MSVC problem matcher
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Build CPython
run: .\PCbuild\build.bat -e -d -p arm64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
run: .\PCbuild\build.bat -e -d -v -p arm64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
rev: v0.1.7
hooks:
- id: ruff
name: Run Ruff on Lib/test/
Expand All @@ -24,7 +24,7 @@ repos:
types_or: [c, inc, python, rst]

- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.8.1
rev: v0.9.1
hooks:
- id: sphinx-lint
args: [--enable=default-role]
Expand Down
16 changes: 10 additions & 6 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ Querying the error indicator
.. note::
This function *does not* implicitly set the ``__traceback__``
This function *does not* implicitly set the
:attr:`~BaseException.__traceback__`
attribute on the exception value. If setting the traceback
appropriately is desired, the following additional snippet is needed::
Expand Down Expand Up @@ -753,7 +754,8 @@ Exception Objects
.. c:function:: PyObject* PyException_GetTraceback(PyObject *ex)
Return the traceback associated with the exception as a new reference, as
accessible from Python through :attr:`__traceback__`. If there is no
accessible from Python through the :attr:`~BaseException.__traceback__`
attribute. If there is no
traceback associated, this returns ``NULL``.
Expand All @@ -767,8 +769,8 @@ Exception Objects
Return the context (another exception instance during whose handling *ex* was
raised) associated with the exception as a new reference, as accessible from
Python through :attr:`__context__`. If there is no context associated, this
returns ``NULL``.
Python through the :attr:`~BaseException.__context__` attribute.
If there is no context associated, this returns ``NULL``.
.. c:function:: void PyException_SetContext(PyObject *ex, PyObject *ctx)
Expand All @@ -782,7 +784,8 @@ Exception Objects
Return the cause (either an exception instance, or ``None``,
set by ``raise ... from ...``) associated with the exception as a new
reference, as accessible from Python through :attr:`__cause__`.
reference, as accessible from Python through the
:attr:`~BaseException.__cause__` attribute.
.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *cause)
Expand All @@ -791,7 +794,8 @@ Exception Objects
it. There is no type check to make sure that *cause* is either an exception
instance or ``None``. This steals a reference to *cause*.
:attr:`__suppress_context__` is implicitly set to ``True`` by this function.
The :attr:`~BaseException.__suppress_context__` attribute is implicitly set
to ``True`` by this function.
.. c:function:: PyObject* PyException_GetArgs(PyObject *ex)
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ There are a few functions specific to Python functions.
must be a dictionary with the global variables accessible to the function.
The function's docstring and name are retrieved from the code object.
:func:`~function.__module__`
:attr:`~function.__module__`
is retrieved from *globals*. The argument defaults, annotations and closure are
set to ``NULL``. :attr:`~function.__qualname__` is set to the same value as
the code object's :attr:`~codeobject.co_qualname` field.
Expand Down
6 changes: 6 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@
# be resolved, as the method is currently undocumented. For context, see
# https://github.com/python/cpython/pull/103289.
('py:meth', '_SubParsersAction.add_parser'),
# Attributes/methods/etc. that definitely should be documented better,
# but are deferred for now:
('py:attr', '__annotations__'),
('py:meth', '__missing__'),
('py:attr', '__wrapped__'),
('py:meth', 'index'), # list.index, tuple.index, etc.
]

# gh-106948: Copy standard C types declared in the "c:type" domain to the
Expand Down
8 changes: 8 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ Creating network servers
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
reuse_address=None, reuse_port=None, \
keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True)
Expand Down Expand Up @@ -735,6 +736,13 @@ Creating network servers
set this flag when being created. This option is not supported on
Windows.

* *keep_alive* set to ``True`` keeps connections active by enabling the
periodic transmission of messages.

.. versionchanged:: 3.13

Added the *keep_alive* parameter.

* *ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait
for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/bdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ The :mod:`bdb` module also defines two classes:
.. method:: set_quit()

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


Derived classes and clients can call the following methods to manipulate
Expand Down
14 changes: 7 additions & 7 deletions Doc/library/cmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ A :class:`Cmd` instance has the following methods:

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

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


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

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

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


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

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


.. attribute:: Cmd.undoc_header

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


Expand Down
Loading

0 comments on commit 14a9635

Please sign in to comment.