As originally discussed in #2692 , this adds a three new custom directives intended to be used at the top of PEPs:
* `pep-banner`, a generic admonition banner that can be subclassed with an arbitrary message,
* `canonical-docs`, which renders a banner linking to a `Final` PEP's canonical documentation/specification.
* `canonical-pypa-spec`, a banner for packaging interoperability PEPs linking to the canonical PyPA specs.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Fix canonical link tag to point to correct PEP URL
* Use shorter, standard HTML5 syntax for self-closing tags
* Avoid depr clip prop & use better supported transform prop in CSS
* Use strict mode in the color scheme JS
Since the basic admonition admonition styles are just applied to a couple individual admonitions, rather than admonitions in general, those other than "warning" and "note" won't display as admonitions at all. In addition to fixing that, this PR adds appropriate, standard colors for each of the additional admonition types in both light and dark mode.
* Infra: remove one of the four instances of title at top of pages
* Infra: remove another of the five instances of title at top of pages
* Infra: but keep PEP number in the breadcrumbs
* Infra: Include mailing list link type in text for clarity, & refactor
* Infra: Support mailing list info pages as well as archives
* Infra: Pretty-format Discourse categories/threads in headers as well
* Infra: Show friendly-name of target in Post-History link hover text
* Infra: Automatically link list addresses to list pages in Discussions-To
* Infra: Use simpler check for title in Discourse URL header processing
* Infra: Automatically trim trailing commas & whitespace in header values
As written up in detail at https://github.com/python/peps/issues/2511, this rule breaks the rendering of 199 inline literals across all the PEPs, and appears to have no reason to exist. I therefore propose to remove it.
* Add PEP 0 parser
* Add PEP 0 writer
* Add PEP 0 generator and authors override
* Add/update build and run
* Simplify `create_index_file`
* Special status handling
* Add constants for PEP related magic strings
* Prefer checking on class
* Add PEP.hide_status, use constants
* Remove comment from 2008 (current method works fine)
* Clarify intent of for-else loop
* Hook in to Sphinx (oops, missed when splitting out this PR)
* Rename AUTHORS.csv for clarity
* Sort and strip spaces
* Prefer `authors_overrides` name
* Add pep_0_errors.py
* Move author_sort_by to writer
* PEP init misc
* Split out Author
* Drop pep_0 prefix
* Pass title length as an argument
* Add constants.py to hold global type / status values
* Capitalise constants
* Capitalise constants
* Update PEP classification algorithm
* Extract static methods to module level
* Add emit_text, emit_pep_row
* Use constants in writer.py
* Sort imports
* Sort constants
* Fix sorting in historical and dead PEPs
* Extract static methods to module level
* Extract static methods to module level (parser.py
* Make Author a NamedTuple
* Fix author duplication bug with NamedTuples
* Revert to old PEP classification algorithm
* Define PEP equality
See #2, #1385 for context. Superseeds #1566.
This is the docutils parsing, transforms and writing part, building on PR #1930. It contains a pseudo-package, `sphinx_pep_extensions`, which itself contains:
### Docutils parsing:
- `PEPParser` - collates transforms and interfaces with Sphinx core
- `PEPRole` - deals with :PEP:`blah` in RST source
### Docutils transforms:
- `PEPContents` (Creates table of contents without page title)
- `PEPFooter` (Dels with footnotes, link to source, last modified commit)
- `PEPHeaders` (Parses RFC2822 headers)
- `PEPTitle` - Creates document title from PEP headers
- `PEPZero` - Masks email addresses and creates links to PEP numbers from tables in `pep-0000.rst`
### Docutils HTML output:
- `PEPTranslator` - Overrides to the default HTML translator to enable better matching of the current PEP styles