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
See #2, #1385 for context. Superseeds #1565.
This is the minimal core Sphinx support part, adding a bare minimum of useful things to get Sphinx to build and deploy, whilst not affecting the current build system. There is no theming or custom parsing needed to properly deal with PEPs.
- `build.py` - build script
- `conf.py` - Sphinx configuration
- `Makefile` - new targets for Sphinx
- `.gitignore` - add ignores for `venv` and `package` directories
- `contents.rst` - Sphinx page to discover all PEPs
- `deploy-gh-pages.yaml` - builds and deploys to github pages
- `requirements.txt`
As it's no longer mandatory to merge, some false positives can sneak in.
It's a burden for RMs, and it's slowly been handled in:
https://bugs.python.org/issue42238
* Add length parameter to PyLineTable_InitAddressRange. Allows line tables that are not sentinel terminated and makes the extent of the line table explicit.
* Make opaque part of PyCodeAddressRange more explicitly opaque.
The new language is more precise, and leaves the door open for more implementation options, by not seeming to require that the pattern implementation must import collections.abc.
The new language allows only using sys.modules if has already been imported (e.g. by peeking in sys.modules).
Also, for internal use of CPython, two new flags, `Py_TPFLAGS_SEQUENCE` and `Py_TPFLAGS_MAPPING` are introduced, which support recognizing built-in sequence and mapping types without importing collections.abc.
These sections were requested in some feedback we got when talking to NumPy and JAX folks. OK, this does make an already-long PEP even longer, but I do think this context is important - especially for folks who don't have strong intuitions for how parametric typing works in Python.