10000 Merge branch 'main' into fix-tokenizer-use-after-free · python/cpython@a58adfd · GitHub
[go: up one dir, main page]

Skip to content

Commit a58adfd

Browse files
authored
Merge branch 'main' into fix-tokenizer-use-after-free
2 parents 0ef4f23 + accb417 commit a58adfd

Some content is hidden

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

52 files changed

+465
-1783
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+name: Read the Docs PR preview
2+
# Automatically edits a pull request's descriptions with a link
3+
# to the documentation's preview on Read the Docs.
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
- opened
9+
paths:
10+
- 'Doc/**'
11+
- '.github/workflows/doc.yml'
12+
13+
permissions:
14+
pull-requests: write
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
documentation-links:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: readthedocs/actions/preview@v1
25+
with:
26+
project-slug: "cpython-previews"
27+
single-version: "true"

.mailmap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file sets the canonical name for contributors to the repository.
2+
# Documentation: https://git-scm.com/docs/gitmailmap
3+
Amethyst Reese <amethyst@n7.gg> <john@noswap.com>

.readthedocs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
# Project page: https://readthedocs.org/projects/cpython-previews/
4+
5+
version: 2
6+
7+
sphinx:
8+
configuration: Doc/conf.py
9+
10+
build:
11+
os: ubuntu-22.04
12+
tools:
13+
python: "3"
14+
15+
commands:
16+
- make -C Doc venv html
17+
- mkdir _readthedocs
18+
- mv Doc/build/html _readthedocs/html

Doc/c-api/import.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ Importing Modules
188188
.. versionchanged:: 3.3
189189
Uses :func:`imp.source_from_cache()` in calculating the source path if
190190
only the bytecode path is provided.
191+
.. versionchanged:: 3.12
192+
No longer uses the removed ``imp`` module.
191193
192194
193195
.. c:function:: long PyImport_GetMagicNumber()

Doc/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,13 @@
114114
# Short title used e.g. for <title> HTML tags.
115115
html_short_title = '%s Documentation' % release
116116

117-
# Deployment preview information, from Netlify
118-
# (See netlify.toml and https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)
117+
# Deployment preview information
118+
# (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html)
119+
repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL")
119120
html_context = {
120-
"is_deployment_preview": os.getenv("IS_DEPLOYMENT_PREVIEW"),
121-
"repository_url": os.getenv("REPOSITORY_URL"),
122-
"pr_id": os.getenv("REVIEW_ID")
121+
"is_deployment_preview": os.getenv("READTHEDOCS_VERSION_TYPE") == "external",
122+
"repository_url": repository_url.removesuffix(".git") if repository_url else None,
123+
"pr_id": os.getenv("READTHEDOCS_VERSION")
123124
}
124125

125126
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,

Doc/library/calendar.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,58 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
2828
2 BC, and so on.
2929

3030

31+
.. class:: Day
32+
33+
Enumeration defining the days of the week as integer constants, from 0 to 6.
34+
35+
.. attribute:: MONDAY
36+
37+
.. attribute:: TUESDAY
38+
39+
.. attribute:: WEDNESDAY
40+
41+
.. attribute:: THURSDAY
42+
43+
.. attribute:: FRIDAY
44+
45+
.. attribute:: SATURDAY
46+
47+
.. attribute:: SUNDAY
48+
49+
.. versionadded:: 3.12
50+
51+
52+
.. class:: Month
53+
54+
Enumeration defining months of the year as integer constants, from 1 to 12.
55+
56+
.. attribute:: JANUARY
57+
58+
.. attribute:: FEBRUARY
59+
60+
.. attribute:: MARCH
61+
62+
.. attribute:: APRIL
63+
64+
.. attribute:: MAY
65+
66+
.. attribute:: JUNE
67+
68+
.. attribute:: JULY
69+
70+
.. attribute:: AUGUST
71+
72+
.. attribute:: SEPTEMBER
73+
74+
.. attribute:: OCTOBER
75+
76+
.. attribute:: NOVEMBER
77+
78+
.. attribute:: DECEMBER
79+
80+
.. versionadded:: 3.12
81+
82+
3183
.. class:: Calendar(firstweekday=0)
3284

3385
Creates a :class:`Calendar` object. *firstweekday* is an integer specifying the

0 commit comments

Comments
 (0)
0