Skip to content

Commit 1204205

Browse files
authored
Merge branch 'main' into immortal-ref-count-stats
2 parents e179c31 + 6203ef3 commit 1204205

30 files changed

+589
-375
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Python/compile.c @markshannon @iritkatriel
3838
Python/assemble.c @markshannon @iritkatriel
3939
Python/flowgraph.c @markshannon @iritkatriel
4040
Python/instruction_sequence.c @iritkatriel
41-
Python/ast_opt.c @isidentical
4241
Python/bytecodes.c @markshannon
4342
Python/optimizer*.c @markshannon
4443
Python/optimizer_analysis.c @Fidget-Spinner
@@ -158,10 +157,12 @@ Include/internal/pycore_time.h @pganssle @abalkin
158157
/Tools/cases_generator/ @markshannon
159158

160159
# AST
161-
Python/ast.c @isidentical @JelleZijlstra
162-
Parser/asdl.py @isidentical @JelleZijlstra
163-
Parser/asdl_c.py @isidentical @JelleZijlstra
164-
Lib/ast.py @isidentical @JelleZijlstra
160+
Python/ast.c @isidentical @JelleZijlstra @eclips4
161+
Python/ast_opt.c @isidentical @eclips4
162+
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
163+
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
164+
Lib/ast.py @isidentical @JelleZijlstra @eclips4
165+
Lib/test/test_ast/ @eclips4
165166

166167
# Mock
167168
/Lib/unittest/mock.py @cjw296

Doc/c-api/monitoring.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. highlight:: c
22

3-
.. _monitoring:
3+
.. _c-api-monitoring:
44

55
Monitoring C API
66
================
@@ -141,18 +141,18 @@ would typically correspond to a python function.
141141
to the base-2 logarithm of ``sys.monitoring.events.PY_START``.
142142
``state_array`` is an array with a monitoring state entry for each event in
143143
``event_types``, it is allocated by the user but populated by
144-
``PyMonitoring_EnterScope`` with information about the activation state of
144+
:c:func:`!PyMonitoring_EnterScope` with information about the activation state of
145145
the event. The size of ``event_types`` (and hence also of ``state_array``)
146146
is given in ``length``.
147147
148148
The ``version`` argument is a pointer to a value which should be allocated
149149
by the user together with ``state_array`` and initialized to 0,
150-
and then set only by ``PyMonitoring_EnterScope`` itelf. It allows this
150+
and then set only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this
151151
function to determine whether event states have changed since the previous call,
152152
and to return quickly if they have not.
153153
154154
The scopes referred to here are lexical scopes: a function, class or method.
155-
``PyMonitoring_EnterScope`` should be called whenever the lexical scope is
155+
:c:func:`!PyMonitoring_EnterScope` should be called whenever the lexical scope is
156156
entered. Scopes can be reentered, reusing the same *state_array* and *version*,
157157
in situations like when emulating a recursive Python function. When a code-like's
158158
execution is paused, such as when emulating a generator, the scope needs to
@@ -189,4 +189,4 @@ would typically correspond to a python function.
189189
190190
.. c:function:: int PyMonitoring_ExitScope(void)
191191
192-
Exit the last scope that was entered with ``PyMonitoring_EnterScope``.
192+
Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.

Doc/c-api/time.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. highlight:: c
22

3+
.. _c-api-time:
4+
35
PyTime C API
46
============
57

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ Glossary
11311131
:class:`tuple`, and :class:`bytes`. Note that :class:`dict` also
11321132
supports :meth:`~object.__getitem__` and :meth:`!__len__`, but is considered a
11331133
mapping rather than a sequence because the lookups use arbitrary
1134-
:term:`immutable` keys rather than integers.
1134+
:term:`hashable` keys rather than integers.
11351135

11361136
The :class:`collections.abc.Sequence` abstract base class
11371137
defines a much richer interface that goes beyond just

Doc/library/argparse.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ The ``deprecated`` keyword argument of
14551455
specifies if the argument is deprecated and will be removed
14561456
in the future.
14571457
For arguments, if ``deprecated`` is ``True``, then a warning will be
1458-
printed to standard error when the argument is used::
1458+
printed to :data:`sys.stderr` when the argument is used::
14591459

14601460
>>> import argparse
14611461
>>> parser = argparse.ArgumentParser(prog='snake.py')
@@ -2235,8 +2235,8 @@ Exiting methods
22352235
.. method:: ArgumentParser.exit(status=0, message=None)
22362236

22372237
This method terminates the program, exiting with the specified *status*
2238-
and, if given, it prints a *message* before that. The user can override
2239-
this method to handle these steps differently::
2238+
and, if given, it prints a *message* to :data:`sys.stderr` before that.
2239+
The user can override this method to handle these steps differently::
22402240

22412241
class ErrorCatchingArgumentParser(argparse.ArgumentParser):
22422242
def exit(self, status=0, message=None):
@@ -2246,8 +2246,8 @@ Exiting methods
22462246

22472247
.. method:: ArgumentParser.error(message)
22482248

2249-
This method prints a usage message including the *message* to the
2250-
standard error and terminates the program with a status code of 2.
2249+
This method prints a usage message, including the *message*, to
2250+
:data:`sys.stderr` and terminates the program with a status code of 2.
22512251

22522252

22532253
Intermixed parsing

Doc/library/re.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,12 @@ character ``'$'``.
572572
Word boundaries are determined by the current locale
573573
if the :py:const:`~re.LOCALE` flag is used.
574574

575+
.. note::
576+
577+
Note that ``\B`` does not match an empty string, which differs from
578+
RE implementations in other programming languages such as Perl.
579+
This behavior is kept for compatibility reasons.
580+
575581
.. index:: single: \d; in regular expressions
576582

577583
``\d``

Doc/library/sys.monitoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Per code object events
262262
Events can also be controlled on a per code object basis. The functions
263263
defined below which accept a :class:`types.CodeType` should be prepared
264264
to accept a look-alike object from functions which are not defined
265-
in Python (see :ref:`monitoring`).
265+
in Python (see :ref:`c-api-monitoring`).
266266

267267
.. function:: get_local_events(tool_id: int, code: CodeType, /) -> int
268268

Doc/library/xml.etree.elementtree.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ XMLParser Objects
13751375

13761376
.. versionchanged:: 3.8
13771377
Parameters are now :ref:`keyword-only <keyword-only_parameter>`.
1378-
The *html* argument no longer supported.
1378+
The *html* argument is no longer supported.
13791379

13801380

13811381
.. method:: close()

0 commit comments

Comments
 (0)