Skip to content

Commit 56774f8

Browse files
committed
Merge branch 'main' into frozendict_pickle
2 parents 36e008c + a18e0fa commit 56774f8

Some content is hidden

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

45 files changed

+14753
-15096
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ Lib/test/test_dataclasses/ @ericvsmith
424424

425425
# Dates and times
426426
Doc/**/*time.rst @pganssle @abalkin
427+
Doc/library/datetime-* @pganssle
427428
Doc/library/zoneinfo.rst @pganssle
428429
Include/datetime.h @pganssle @abalkin
429430
Include/internal/pycore_time.h @pganssle @abalkin
@@ -473,8 +474,9 @@ Lib/test/test_functools.py @rhettinger
473474
Modules/_functoolsmodule.c @rhettinger
474475

475476
# Garbage collector
476-
Modules/gcmodule.c @pablogsal
477-
Doc/library/gc.rst @pablogsal
477+
Modules/gcmodule.c @pablogsal
478+
Doc/library/gc.rst @pablogsal
479+
InternalDocs/garbage_collector.md @pablogsal
478480

479481
# Gettext
480482
Doc/library/gettext.rst @tomasr8

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ body:
88
> [!NOTE]
99
> Trivial changes (for example typos) don’t require an issue before opening a PR.
1010
- type: textarea
11+
id: description
1112
attributes:
1213
label: "Documentation"
13-
description: "A clear and concise description of the issue."
14+
description: "A clear and concise description of the issue. Include a link to the page."
1415
validations:
1516
required: true

Doc/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@
227227
# Temporary undocumented names.
228228
# In future this list must be empty.
229229
nitpick_ignore += [
230-
# Do not error nit-picky mode builds when _SubParsersAction.add_parser cannot
231-
# be resolved, as the method is currently undocumented. For context, see
232-
# https://github.com/python/cpython/pull/103289.
233-
('py:meth', '_SubParsersAction.add_parser'),
234230
# Attributes/methods/etc. that definitely should be documented better,
235231
# but are deferred for now:
236232
('py:attr', '__wrapped__'),

Doc/faq/programming.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,8 @@ to the object:
18521852
13891296
18531853

18541854

1855+
.. _faq-identity-with-is:
1856+
18551857
When can I rely on identity tests with the *is* operator?
18561858
---------------------------------------------------------
18571859

Doc/improve-page-nojs.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
:orphan:
2+
3+
****************************
4+
Improve a documentation page
5+
****************************
6+
7+
.. This is the no-javascript version of this page. The one most people
8+
will see (with JavaScript enabled) is improve-page.rst. If you edit
9+
this page, please also edit that one, and vice versa.
10+
11+
.. only:: html and not epub
12+
13+
We are always interested to hear ideas about improvements to the documentation.
14+
15+
.. only:: translation
16+
17+
If the bug or suggested improvement concerns the translation of this
18+
documentation, open an issue or edit the page in
19+
`translation's repository <TRANSLATION_REPO_>`_ instead.
20+
21+
You have a few ways to ask questions or suggest changes:
22+
23+
- You can start a discussion about the page on the Python discussion forum.
24+
This link will start a topic in the Documentation category:
25+
`New Documentation topic <https://discuss.python.org/new-topic?category=documentation>`_.
26+
27+
- You can open an issue on the Python GitHub issue tracker. This link will
28+
create a new issue with the "docs" label:
29+
`New docs issue <https://github.com/python/cpython/issues/new?template=documentation.yml>`_.

Doc/improve-page.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
:orphan:
2+
3+
****************************
4+
Improve a documentation page
5+
****************************
6+
7+
.. This is the JavaScript-enabled version of this page. Another version
8+
(for those with JavaScript disabled) is improve-page-nojs.rst. If you
9+
edit this page, please also edit that one, and vice versa.
10+
11+
.. only:: html and not epub
12+
13+
.. raw:: html
14+
15+
<script>
16+
function applyReplacements(text, params) {
17+
return text
18+
.replace(/PAGETITLE/g, params.get('pagetitle'))
19+
.replace(/PAGEURL/g, params.get('pageurl'))
20+
.replace(/PAGESOURCE/g, params.get('pagesource'));
21+
}
22+
23+
document.addEventListener('DOMContentLoaded', () => {
24+
const params = new URLSearchParams(window.location.search);
25+
const walker = document.createTreeWalker(
26+
document.body,
27+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
28+
null
29+
);
30+
31+
while (walker.nextNode()) {
32+
const node = walker.currentNode;
33+
34+
if (node.nodeType === Node.TEXT_NODE) {
35+
node.textContent = applyReplacements(node.textContent, params)
36+
} else if (node.nodeName === 'A' && node.href) {
37+
node.setAttribute('href', applyReplacements(node.getAttribute('href'), params));
38+
}
39+
}
40+
});
41+
</script>
42+
43+
We are always interested to hear ideas about improvements to the documentation.
44+
45+
You were reading "PAGETITLE" at `<PAGEURL>`_. The source for that page is on
46+
`GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_.
47+
48+
.. only:: translation
49+
50+
If the bug or suggested improvement concerns the translation of this
51+
documentation, open an issue or edit the page in
52+
`translation's repository <TRANSLATION_REPO_>`_ instead.
53+
54+
You have a few ways to ask questions or suggest changes:
55+
56+
- You can start a discussion about the page on the Python discussion forum.
57+
This link will start a pre-populated topic:
58+
`Question about page "PAGETITLE" <https://discuss.python.org/new-topic?category=documentation&title=Question+about+page+%22PAGETITLE%22&body=About+the+page+at+PAGEURL%3A>`_.
59+
60+
- You can open an issue on the Python GitHub issue tracker. This link will
61+
create a new pre-populated issue:
62+
`Docs: problem with page "PAGETITLE" <https://github.com/python/cpython/issues/new?template=documentation.yml&title=Docs%3A+problem+with+page+%22PAGETITLE%22&description=The+page+at+PAGEURL+has+a+problem%3A>`_.
63+
64+
- You can `edit the page on GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_
65+
to open a pull request and begin the contribution process.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Used to generate datetime-inheritance.svg with Graphviz
2+
// (https://graphviz.org/) for the datetime documentation.
3+
4+
digraph {
5+
comment="Generated with datetime-inheritance.dot"
6+
graph [
7+
bgcolor="transparent"
8+
fontnames="svg"
9+
layout="dot"
10+
ranksep=0.5
11+
nodesep=0.5
12+
splines=line
13+
]
14+
node [
15+
fontname="Courier"
16+
fontsize=14.0
17+
shape=box
18+
style=rounded
19+
margin="0.15,0.07"
20+
]
21+
edge [
22+
arrowhead=none
23+
]
24+
25+
object -> tzinfo
26+
object -> timedelta
27+
object -> time
28+
object -> date
29+
tzinfo -> timezone
30+
date -> datetime
31+
}
Lines changed: 84 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)