Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPython Enhancement Proposals
The PEPs in this repo are published automatically on the web athttp://www.python.org/dev/peps/. To learn more about the purpose ofPEPs and how to go about writing a PEP, please start reading at PEP 1(pep-0001.txt
in this repo). Note that PEP 0, the index PEP, isnow automatically generated, and not committed to the repo.
Contributing to PEPs
See theContributing Guidelines.
reStructuredText for PEPs
Original PEP source should be written in reStructuredText format,which is a constrained version of plaintext, and is described inPEP 12. Older PEPs were often written in a more mildly restrictedplaintext format, as described in PEP 9. Thepep2html.py
processing and installation script knows how to produce the HTMLfor either PEP format.
For processing reStructuredText format PEPs, you need the docutilspackage, which is available fromPyPI.If you have pip,pip install docutils
should install it.
Generating the PEP Index
PEP 0 is automatically generated based on the metadata headers in otherPEPs. The script handling this isgenpepindex.py
, with supportinglibraries in thepep0
directory.
Checking PEP formatting and rendering
Do not commit changes with bad formatting. To check the formatting ofa PEP, use the Makefile. In particular, to generate HTML for PEP 999,your source code should be inpep-0999.rst
and the HTML will begenerated topep-0999.html
by the commandmake pep-0999.html
.The default Make target generates HTML for all PEPs.
If you don't have Make, use thepep2html.py
script directly.
Generating HTML for python.org
python.org includes its own helper modules to render PEPs as HTML, withsuitable links back to the source pages in the version control repository.
These can be found athttps://github.com/python/pythondotorg/tree/master/peps
When making changes to the PEP management process that may impact python.org'srendering pipeline:
- Clone the python.org repository fromhttps://github.com/python/pythondotorg/
- Get set up for local python.org development as perhttps://pythondotorg.readthedocs.io/install.html#manual-setup
- Adjust
PEP_REPO_PATH
inpydotorg/settings/local.py
to refer to yourlocal clone of the PEP repository - Run
./manage.py generate_pep_pages
as described inhttps://pythondotorg.readthedocs.io/pep_generation.html