Skip to content

Commit d5417b4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into doctest-tidy-output-colour2
2 parents 95b9831 + 241ed5f commit d5417b4

466 files changed

Lines changed: 12768 additions & 4543 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ jobs:
492492
with:
493493
config_hash: ${{ needs.check_source.outputs.config_hash }}
494494
options: ./configure --config-cache --with-thread-sanitizer --with-pydebug
495+
suppressions_path: Tools/tsan/supressions.txt
495496

496497
build_tsan_free_threading:
497498
name: 'Thread sanitizer (free-threading)'
@@ -501,6 +502,7 @@ jobs:
501502
with:
502503
config_hash: ${{ needs.check_source.outputs.config_hash }}
503504
options: ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
505+
suppressions_path: Tools/tsan/suppressions_free_threading.txt
504506

505507
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
506508
cifuzz:

.github/workflows/reusable-tsan.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
options:
88
required: true
99
type: string
10+
suppressions_path:
11+
description: 'A repo relative path to the suppressions file'
12+
required: true
13+
type: string
1014

1115
jobs:
1216
build_tsan_reusable:
@@ -30,7 +34,7 @@ jobs:
3034
sudo sysctl -w vm.mmap_rnd_bits=28
3135
- name: TSAN Option Setup
3236
run: |
33-
echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/Tools/tsan/supressions.txt" >> $GITHUB_ENV
37+
echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }}" >> $GITHUB_ENV
3438
echo "CC=clang" >> $GITHUB_ENV
3539
echo "CXX=clang++" >> $GITHUB_ENV
3640
- name: Add ccache to PATH

Doc/c-api/unicode.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ APIs:
523523
- Get the fully qualified name of an object type;
524524
call :c:func:`PyType_GetFullyQualifiedName`.
525525
526-
* - ``T#``
526+
* - ``#T``
527527
- :c:expr:`PyObject*`
528528
- Similar to ``T`` format, but use a colon (``:``) as separator between
529529
the module name and the qualified name.
@@ -533,7 +533,7 @@ APIs:
533533
- Get the fully qualified name of a type;
534534
call :c:func:`PyType_GetFullyQualifiedName`.
535535
536-
* - ``N#``
536+
* - ``#N``
537537
- :c:expr:`PyTypeObject*`
538538
- Similar to ``N`` format, but use a colon (``:``) as separator between
539539
the module name and the qualified name.
@@ -574,7 +574,7 @@ APIs:
574574
copied as-is to the result string, and any extra arguments discarded.
575575
576576
.. versionchanged:: 3.13
577-
Support for ``%T``, ``%T#``, ``%N`` and ``%N#`` formats added.
577+
Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added.
578578
579579
580580
.. c:function:: PyObject* PyUnicode_FromFormatV(const char *format, va_list vargs)

Doc/conf.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
sys.path.append(os.path.abspath('tools/extensions'))
1313
sys.path.append(os.path.abspath('includes'))
1414

15+
from pyspecific import SOURCE_URI
16+
1517
# General configuration
1618
# ---------------------
1719

@@ -24,6 +26,7 @@
2426
'pyspecific',
2527
'sphinx.ext.coverage',
2628
'sphinx.ext.doctest',
29+
'sphinx.ext.extlinks',
2730
]
2831

2932
# Skip if downstream redistributors haven't installed them
@@ -513,6 +516,19 @@
513516
r'https://unix.org/version2/whatsnew/lp64_wp.html',
514517
]
515518

519+
# Options for sphinx.ext.extlinks
520+
# -------------------------------
521+
522+
# This config is a dictionary of external sites,
523+
# mapping unique short aliases to a base URL and a prefix.
524+
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
525+
extlinks = {
526+
"cve": ("https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s", "CVE-%s"),
527+
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
528+
"pypi": ("https://pypi.org/project/%s/", "%s"),
529+
"source": (SOURCE_URI, "%s"),
530+
}
531+
extlinks_detect_hardcoded_links = True
516532

517533
# Options for extensions
518534
# ----------------------

Doc/faq/library.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,16 +616,15 @@ use ``p.read(n)``.
616616
("ptys") instead of pipes. Or you can use a Python interface to Don Libes'
617617
"expect" library. A Python extension that interfaces to expect is called
618618
"expy" and available from https://expectpy.sourceforge.net. A pure Python
619-
solution that works like expect is `pexpect
620-
<https://pypi.org/project/pexpect/>`_.
619+
solution that works like expect is :pypi:`pexpect`.
621620
622621
623622
How do I access the serial (RS232) port?
624623
----------------------------------------
625624
626625
For Win32, OSX, Linux, BSD, Jython, IronPython:
627626
628-
https://pypi.org/project/pyserial/
627+
:pypi:`pyserial`
629628
630629
For Unix, see a Usenet post by Mitch Chapman:
631630

Doc/glossary.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ Glossary
547547
tasks such as compression or hashing. Also, the GIL is always released
548548
when doing I/O.
549549

550-
Past efforts to create a "free-threaded" interpreter (one which locks
551-
shared data at a much finer granularity) have not been successful
552-
because performance suffered in the common single-processor case. It
553-
is believed that overcoming this performance issue would make the
554-
implementation much more complicated and therefore costlier to maintain.
555-
550+
As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil`
551+
build configuration. After building Python with this option, code must be
552+
run with :option:`-X gil 0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 <PYTHON_GIL>`
553+
environment variable. This feature enables improved performance for
554+
multi-threaded applications and makes it easier to use multi-core CPUs
555+
efficiently. For more details, see :pep:`703`.
556556

557557
hash-based pyc
558558
A bytecode cache file that uses the hash rather than the last-modified
@@ -800,8 +800,7 @@ Glossary
800800

801801
method resolution order
802802
Method Resolution Order is the order in which base classes are searched
803-
for a member during lookup. See `The Python 2.3 Method Resolution Order
804-
<https://www.python.org/download/releases/2.3/mro/>`_ for details of the
803+
for a member during lookup. See :ref:`python_2.3_mro` for details of the
805804
algorithm used by the Python interpreter since the 2.3 release.
806805

807806
module

Doc/howto/curses.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ appearance---and the curses library will figure out what control codes
4343
need to be sent to the terminal to produce the right output. curses
4444
doesn't provide many user-interface concepts such as buttons, checkboxes,
4545
or dialogs; if you need such features, consider a user interface library such as
46-
`Urwid <https://pypi.org/project/urwid/>`_.
46+
:pypi:`Urwid`.
4747

4848
The curses library was originally written for BSD Unix; the later System V
4949
versions of Unix from AT&T added many enhancements and new functions. BSD curses
@@ -56,8 +56,7 @@ versions of curses carried by some proprietary Unixes may not support
5656
everything, though.
5757

5858
The Windows version of Python doesn't include the :mod:`curses`
59-
module. A ported version called `UniCurses
60-
<https://pypi.org/project/UniCurses>`_ is available.
59+
module. A ported version called :pypi:`UniCurses` is available.
6160

6261

6362
The Python curses module
@@ -429,8 +428,7 @@ User Input
429428

430429
The C curses library offers only very simple input mechanisms. Python's
431430
:mod:`curses` module adds a basic text-input widget. (Other libraries
432-
such as `Urwid <https://pypi.org/project/urwid/>`_ have more extensive
433-
collections of widgets.)
431+
such as :pypi:`Urwid` have more extensive collections of widgets.)
434432

435433
There are two methods for getting input from a window:
436434

Doc/howto/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ Currently, the HOWTOs are:
3333
annotations.rst
3434
isolating-extensions.rst
3535
timerfd.rst
36+
mro.rst
3637

Doc/howto/logging-cookbook.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ Subclassing QueueHandler and QueueListener- a ``pynng`` example
19121912
---------------------------------------------------------------
19131913

19141914
In a similar way to the above section, we can implement a listener and handler
1915-
using `pynng <https://pypi.org/project/pynng/>`_, which is a Python binding to
1915+
using :pypi:`pynng`, which is a Python binding to
19161916
`NNG <https://nng.nanomsg.org/>`_, billed as a spiritual successor to ZeroMQ.
19171917
The following snippets illustrate -- you can test them in an environment which has
19181918
``pynng`` installed. Just for variety, we present the listener first.
@@ -3575,9 +3575,8 @@ A Qt GUI for logging
35753575

35763576
A question that comes up from time to time is about how to log to a GUI
35773577
application. The `Qt <https://www.qt.io/>`_ framework is a popular
3578-
cross-platform UI framework with Python bindings using `PySide2
3579-
<https://pypi.org/project/PySide2/>`_ or `PyQt5
3580-
<https://pypi.org/project/PyQt5/>`_ libraries.
3578+
cross-platform UI framework with Python bindings using :pypi:`PySide2`
3579+
or :pypi:`PyQt5` libraries.
35813580

35823581
The following example shows how to log to a Qt GUI. This introduces a simple
35833582
``QtHandler`` class which takes a callable, which should be a slot in the main

0 commit comments

Comments
 (0)