Commit Graph

168 Commits

Author SHA1 Message Date
Samuel f37f57dfe6 gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (GH-133773)
Also fix docs ASDL highlighting.
2025-12-29 13:43:09 +02:00
SYan212 57d569942c Fix typos in docs (#143193) 2025-12-27 09:52:28 +02:00
Stan Ulbrych f9704f1d84 gh-84232: Fix pydoc docs.python.org link generation (#139995)
Co-authored-by: Éric <merwok@netwok.org>
2025-12-23 10:29:58 +02:00
Adam Turner 77399436bf Docs: Prepare for Sphinx 9 (#142057) 2025-11-29 16:49:37 +02:00
Adam Turner 3c117380ab GH-121970: Remove Docutils list monkeypatch (#142056) 2025-11-29 14:28:23 +00:00
Petr Viktorin d81e1ef0f3 gh-138189: Document type slots, and other constants, as part of Limited API (GH-138190)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-04 22:58:53 +01:00
Adam Turner b265a7ddeb GH-134848: Use a set to store `AuditEvents.sources` (#134849) 2025-05-28 17:30:53 +01:00
Hugo van Kemenade 942673ed19 Finishing touches to update main branch for 3.15 (#133588) 2025-05-07 20:46:41 +03:00
Hugo van Kemenade 5f01b00dea Python 3.14.0b1 2025-05-06 18:32:57 +03:00
Adam Turner 443c0cd17c gh-127833: Use productionlist nodes to implement the grammar-snippet directive (#130376)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-03-20 15:35:20 +00:00
Adam Turner c1a02f9101 GH-121970: Extract pydoc_topics into a new extension (#131256) 2025-03-19 18:35:11 +00:00
Hugo van Kemenade ca1bedc9a4 gh-121970: Revert "GH-121970: Extract `pydoc_topics` into a new extension (#129116)" (#131245)
Revert "GH-121970: Extract ``pydoc_topics`` into a new extension (#129116)"

This reverts commit 01bcf13a1c.
2025-03-14 16:25:56 +02:00
Adam Turner 043ab3af9a GH-121970: Extract `issue_role` into a new extension (#130615)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-27 19:06:13 +00:00
Adam Turner 3f3e1c4095 Doc: Strip trailing whitespace in `pydoc_topics` (#130492) 2025-02-26 20:10:55 +00:00
sobolevn 5ec4bf86b7 gh-121970: Replace .. coroutine{method,function} with :async: (#130448)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-22 17:54:43 +00:00
Adam Turner 30e892473e GH-121970: Replace custom abstract method directive with the `:abstract:` option (#129311) 2025-02-22 01:53:57 +00:00
Adam Turner 4d56c40440 GH-121970: Extract `implementation_detail` into a new extension (#129663) 2025-02-06 16:53:27 +00:00
Petr Viktorin 58a4357e29 gh-127833: Docs: Add a grammar-snippet directive & replace productionlist (GH-127835)
As a first step toward aligning the grammar documentation with Python's actual
grammar, this overrides the ReST `productionlist` directive to:
- use `:` instead of the `::=` symbol
- add syntax highlighting for strings (using a Pygments highlighting class)

All links and link targets should be preserved. (Unfortunately, this reaches
into some Sphinx internals; I don't see a better way to do exactly what
Sphinx does.)

This also adds a new directive, `grammar-snippet`, which formats the snippet
almost exactly like what's in the source, modulo syntax highlighting and
keeping the backtick character to mark links to other rules.
This will allow formatting the snippets as in the grammar file
(file:///home/encukou/dev/cpython/Doc/build/html/reference/grammar.html).

The new directive is applied to two simple rules in toplevel_components.rst

---------

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: William Ferreira <wqferr@gmail.com>
Co-authored-by: bswck <bartoszpiotrslawecki@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-05 16:12:23 +01:00
Adam Turner ae4788809d GH-121970: Extract `misc_news` into a new extension (#129577) 2025-02-02 16:17:02 +00:00
Adam Turner 0612a89ffc gh-126609: Allow translating the `availability` directive (#129549) 2025-02-02 16:12:01 +00:00
Adam Turner 0ef8d470b7 GH-121970: Remove pyspecific `PyDecoratorMixin` patches (#129306) 2025-01-26 03:43:23 +00:00
Adam Turner d40692db06 GH-125722: Remove Sphinx patches (#129277) 2025-01-25 03:47:55 +00:00
Adam Turner 01bcf13a1c GH-121970: Extract `pydoc_topics` into a new extension (#129116) 2025-01-21 23:28:32 +00:00
Adam Turner e54ac3b69e GH-121970: Extract `changes` into a new extension (#129105) 2025-01-20 23:53:08 +00:00
Adam Turner d46b577ec0 GH-125722: Increase minimum supported Sphinx to 8.1.3 (#128922) 2025-01-20 00:26:24 +00:00
Hugo van Kemenade c9d2bc6d7f Revert "Doc: Show object descriptions in the table of contents (#125757)" (#128406) 2025-01-02 14:35:00 +00:00
Adam Turner 91ddde4af0 Doc: Show object descriptions in the table of contents (#125757) 2024-10-22 14:07:09 +01:00
Adam Turner cbfd392479 GH-121970: Extract `availability` into a new extension (#125082) 2024-10-09 21:50:03 +01:00
Emily Morehouse 447a15190d gh-125072: Add label for assignment expressions; update tracked section for assignment expression topic (#125074) 2024-10-07 22:51:14 +00:00
Adam Turner 91e64be731 Doc: Fix archive filenames for standard builds (#124826) 2024-10-01 10:43:55 +01:00
Petr Viktorin e349f73a5a gh-121277: Raise nice error on next as second argument to deprecated-removed (GH-124623) 2024-09-27 19:38:40 +02:00
Petr Viktorin 7d24ea9db3 gh-121277: Allow .. versionadded:: next in docs (GH-121278)
Make `versionchanged:: next`` expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-25 23:30:40 +02:00
Adam Turner 6318ffcba2 Doc: Use `major.minor` for documentation distribution archive filenames (#124489) 2024-09-25 20:06:54 +01:00
Alex Waygood 8a2baedc4b Bump Ruff to 0.6.7 (#124384) 2024-09-23 22:19:35 +00:00
Adam Turner 95f5c89b54 GH-121970: Fix `gettext` for audit events (#122651) 2024-08-03 17:41:26 +01:00
Adam Turner 11ad731f4f GH-121970: Extract `audit_events` into a new extension (#122325) 2024-07-30 03:49:00 +00:00
Adam Turner 53e9e7de63 GH-121970: Remove `escape4chm` (#122065) 2024-07-23 13:30:06 +01:00
Adam Turner 8db5f48007 Docs: Fix duplicate object description warnings (#122068) 2024-07-20 19:46:41 +00:00
Adam Turner b7ad711fcb GH-121970: Modernise the patchlevel extension (#121995) 2024-07-20 13:44:43 +00:00
Adam Turner 22c9d9c1fc GH-121970: Rewrite the C-API annotations extension (#121985)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-19 12:21:56 +00:00
Adam Turner 40855f3ab8 GH-121970: Use Ruff to check and format the docs tools (#122018)
Co-authored-by: Alex Waygood <Alex.Waygood@gmail.com>
2024-07-19 11:48:53 +00:00
Adam Turner 898e90c3be GH-121970: Make `DeprecatedRemoved a subclass of VersionChange` (#121971) 2024-07-19 11:39:51 +01:00
Adam Turner adf0b94d1c GH-121970: Improve the glossary preview in HTML search (#121991) 2024-07-19 10:16:59 +01:00
Adam Turner ac39151a09 GH-121970: Use `SphinxDirective instead of Directive` (#121972) 2024-07-19 08:33:51 +01:00
Adam Turner 7431c3799e GH-121970: Combine custom Pygments lexers into a package (#121976)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-18 18:38:29 +00:00
Petr Viktorin 48f21b3631 gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure they stay there (GH-119731)
The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax.
This was solved in ef940de by hiding those rules in the custom syntax highlighter.

This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack.
2024-05-30 09:27:32 +02:00
Carlos Meza 0867bce457 gh-119317: findall instead of traverse for docutils nodes (#119319) 2024-05-24 05:04:12 +03:00
Nice Zombies 7e894c2f38 Docs: Fix SOURCE_URI (#118945) 2024-05-11 05:47:45 -06:00
Inada Naoki 7ac933e260 gh-118689: Doc: fix ePub build (#118690) 2024-05-10 19:24:02 +09:00
Thomas Wouters 2268289a47 Python 3.13.0b1 2024-05-08 11:21:00 +02:00