Skip to content

Commit 9a6009c

Browse files
authored
Merge branch 'main' into main
2 parents 1a09e79 + 4197a79 commit 9a6009c

File tree

103 files changed

+2078
-888
lines changed

Some content is hidden

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

103 files changed

+2078
-888
lines changed

.github/workflows/reusable-change-detection.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
3-
name: Change detection
1+
name: Reusable change detection
42

53
on: # yamllint disable-line rule:truthy
64
workflow_call:

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs
1+
name: Reusable Docs
22

33
on:
44
workflow_call:
@@ -95,7 +95,7 @@ jobs:
9595
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9696
doctest:
9797
name: 'Doctest'
98-
runs-on: ubuntu-latest
98+
runs-on: ubuntu-22.04
9999
timeout-minutes: 60
100100
steps:
101101
- uses: actions/checkout@v4

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable macOS
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-tsan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Thread Sanitizer
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-ubuntu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Ubuntu
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-wasi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable WASI
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: TestsMSI
1+
name: Reusable Windows MSI
22

33
on:
44
workflow_call:

.github/workflows/reusable-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Windows
2+
13
on:
24
workflow_call:
35
inputs:

Doc/c-api/contextvars.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Context object management functions:
136136
137137
.. versionadded:: 3.14
138138
139-
.. c:type:: int (*PyContext_WatchCallback)(PyContextEvent event, PyContext* ctx)
139+
.. c:type:: int (*PyContext_WatchCallback)(PyContextEvent event, PyObject *obj)
140140
141141
Context object watcher callback function. The object passed to the callback
142142
is event-specific; see :c:type:`PyContextEvent` for details.

Doc/conf.py

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import sys
1212
import time
1313

14+
import sphinx
15+
1416
sys.path.append(os.path.abspath('tools/extensions'))
1517
sys.path.append(os.path.abspath('includes'))
1618

@@ -62,7 +64,10 @@
6264

6365
# General substitutions.
6466
project = 'Python'
65-
copyright = f"2001-{time.strftime('%Y')}, Python Software Foundation"
67+
if sphinx.version_info[:2] >= (8, 1):
68+
copyright = "2001-%Y, Python Software Foundation"
69+
else:
70+
copyright = f"2001-{time.strftime('%Y')}, Python Software Foundation"
6671

6772
# We look for the Include/patchlevel.h file in the current Python source tree
6873
# and replace the values accordingly.
@@ -361,10 +366,14 @@
361366
}
362367

363368
# This 'Last updated on:' timestamp is inserted at the bottom of every page.
364-
html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
365-
html_last_updated_fmt = time.strftime(
366-
'%b %d, %Y (%H:%M UTC)', time.gmtime(html_time)
367-
)
369+
html_last_updated_fmt = '%b %d, %Y (%H:%M UTC)'
370+
if sphinx.version_info[:2] >= (8, 1):
371+
html_last_updated_use_utc = True
372+
else:
373+
html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
374+
html_last_updated_fmt = time.strftime(
375+
html_last_updated_fmt, time.gmtime(html_time)
376+
)
368377

369378
# Path to find HTML templates.
370379
templates_path = ['tools/templates']
@@ -596,13 +605,21 @@
596605
# mapping unique short aliases to a base URL and a prefix.
597606
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
598607
extlinks = {
599-
"cve": ("https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s", "CVE-%s"),
600-
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
601608
"pypi": ("https://pypi.org/project/%s/", "%s"),
602609
"source": (SOURCE_URI, "%s"),
603610
}
604611
extlinks_detect_hardcoded_links = True
605612

613+
if sphinx.version_info[:2] < (8, 1):
614+
# Sphinx 8.1 has in-built CVE and CWE roles.
615+
extlinks |= {
616+
"cve": (
617+
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s",
618+
"CVE-%s",
619+
),
620+
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
621+
}
622+
606623
# Options for c_annotations
607624
# -------------------------
608625

0 commit comments

Comments
 (0)