Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
55ef1f4
Infra: Use consistent 'make html' and 'make dirhtml' (#2968)
hugovk Jan 19, 2023
eb63ebd
PEP 582: Fix footnote (#2970)
methane Jan 20, 2023
a48b585
PEP 554: Simplify! (#2812)
ericsnowcurrently Jan 20, 2023
b173099
Infra: replace feedgen/lxml dependency to test Python 3.12-dev (#2973)
hugovk Jan 21, 2023
6fc3a4d
Infra: Use relative links to ease development (#2972)
hugovk Jan 22, 2023
d26af1a
PEP 702: Changes after discussion (#2975)
JelleZijlstra Jan 22, 2023
52d0109
PEP 495: Fix incorrect gap image (#2965)
bxparks Jan 22, 2023
b4de312
PEP 702: Add to Post-History (#2976)
JelleZijlstra Jan 23, 2023
d9503c0
PEP 703: --disable-gil and other small changes (#2979)
colesbury Jan 23, 2023
b4a610b
PEP 13: Update current SC members for 2023 term (#2978)
hugovk Jan 23, 2023
2f277a0
Infra: Fix Replaces/Superseded-By/Requires links for dirhtml (#2981)
hugovk Jan 24, 2023
15caa8f
Infra: Use dark grey instead of dark green for dark theme background …
hugovk Jan 24, 2023
7823187
PEP 702: Fix typo, section ordering (#2982)
JelleZijlstra Jan 24, 2023
6c40d23
PEP 704: Require virtual environments by default for installers (#2964)
pradyunsg Jan 25, 2023
558d206
PEP 699: Add implementation link (#2984)
Fidget-Spinner Jan 28, 2023
32eab93
PEP 701: Incorporate more feedback from the discussion thread (#2974)
pablogsal Jan 28, 2023
e25c1fe
PEP 582: Add more explanation based on feedback (#2983)
kushaldas Jan 29, 2023
2a71e6e
PEP 705: Recording provenance of installed packages
Jan 25, 2023
fa32593
Apply suggestions from code review
Jan 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ pep-0700.rst @pfmoore
pep-0701.rst @pablogsal @isidentical @lysnikolaou
pep-0702.rst @jellezijlstra
pep-0703.rst @ambv
pep-0704.rst @brettcannon @pradyunsg
# ...
# pep-0754.txt
# ...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.x", "3.11-dev"]
python-version: ["3.x", "3.12-dev"]

steps:
- name: 🛎️ Checkout
Expand All @@ -28,7 +28,7 @@ jobs:
python -m pip install --upgrade pip

- name: 🔧 Render PEPs
run: make pages JOBS=$(nproc)
run: make dirhtml JOBS=$(nproc)

# remove the .doctrees folder when building for deployment as it takes two thirds of disk space
- name: 🔥 Clean up files
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11-dev"]
python-version: ["3.9", "3.10", "3.11", "3.12-dev"]
os: [windows-latest, macos-latest, ubuntu-latest]
# lxml doesn't yet install for 3.11 on Windows
exclude:
- { python-version: "3.11-dev", os: windows-latest }

steps:
- uses: actions/checkout@v3
Expand Down
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ JOBS=8
OUTPUT_DIR=build
RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS) -o $(OUTPUT_DIR)

## render to render PEPs to "pep-NNNN.html" files
.PHONY: render
render: venv
## html to render PEPs to "pep-NNNN.html" files
.PHONY: html
html: venv
$(RENDER_COMMAND)

## pages to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: pages
pages: venv rss
## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: dirhtml
dirhtml: venv rss
$(RENDER_COMMAND) --build-dirs

## fail-warning to render PEPs to "pep-NNNN.html" files and fail the Sphinx build on any warning
Expand All @@ -29,7 +29,7 @@ check-links: venv
## rss to generate the peps.rss file
.PHONY: rss
rss: venv
$(VENVDIR)/bin/python3 generate_rss.py
$(VENVDIR)/bin/python3 generate_rss.py -o $(OUTPUT_DIR)

## clean to remove the venv and build files
.PHONY: clean
Expand Down Expand Up @@ -71,6 +71,16 @@ spellcheck: venv
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell

## render (deprecated: use 'make html' alias instead)
.PHONY: render
render: html
@echo "\033[0;33mWarning:\033[0;31m 'make render' \033[0;33mis deprecated, use\033[0;32m 'make html' \033[0;33malias instead\033[0m"

## pages (deprecated: use 'make dirhtml' alias instead)
.PHONY: pages
pages: dirhtml
@echo "\033[0;33mWarning:\033[0;31m 'make pages' \033[0;33mis deprecated, use\033[0;32m 'make dirhtml' \033[0;33malias instead\033[0m"

.PHONY: help
help : Makefile
@echo "Please use \`make <target>' where <target> is one of"
Expand Down
75 changes: 41 additions & 34 deletions generate_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# This file is placed in the public domain or under the
# CC0-1.0-Universal license, whichever is more permissive.

import argparse
import datetime
import email.utils
from html import escape
from pathlib import Path
import re

Expand All @@ -12,19 +14,16 @@
from docutils import utils
from docutils.parsers import rst
from docutils.parsers.rst import roles
from feedgen import entry
from feedgen import feed

# get the directory with the PEP sources
PEP_ROOT = Path(__file__).parent


# Monkeypatch feedgen.util.formatRFC2822
def _format_rfc_2822(dt: datetime.datetime) -> str:
dt = dt.replace(tzinfo=datetime.timezone.utc)
return email.utils.format_datetime(dt, usegmt=True)


entry.formatRFC2822 = feed.formatRFC2822 = _format_rfc_2822
line_cache: dict[Path, dict[str, str]] = {}

# Monkeypatch PEP and RFC reference roles to match Sphinx behaviour
Expand Down Expand Up @@ -137,6 +136,15 @@ def pep_abstract(full_path: Path) -> str:


def main():
parser = argparse.ArgumentParser(description="Generate RSS feed")
parser.add_argument(
"-o",
"--output-dir",
default="build", # synchronise with render.yaml -> deploy step
help="Output directory, relative to root. Default 'build'.",
)
args = parser.parse_args()

# get list of peps with creation time (from "Created:" string in pep source)
peps_with_dt = sorted((pep_creation(path), path) for path in PEP_ROOT.glob("pep-????.???"))

Expand All @@ -152,21 +160,20 @@ def main():
author = first_line_starting_with(full_path, "Author:")
if "@" in author or " at " in author:
parsed_authors = email.utils.getaddresses([author])
# ideal would be to pass as a list of dicts with names and emails to
# item.author, but FeedGen's RSS <author/> output doesn't pass W3C
# validation (as of 12/06/2021)
joined_authors = ", ".join(f"{name} ({email_address})" for name, email_address in parsed_authors)
else:
joined_authors = author
url = f"https://peps.python.org/pep-{pep_num:0>4}/"

item = entry.FeedEntry()
item.title(f"PEP {pep_num}: {title}")
item.link(href=url)
item.description(pep_abstract(full_path))
item.guid(url, permalink=True)
item.published(dt.replace(tzinfo=datetime.timezone.utc)) # ensure datetime has a timezone
item.author(email=joined_authors)
item = f"""\
<item>
<title>PEP {pep_num}: {escape(title, quote=False)}</title>
<link>{escape(url, quote=False)}</link>
<description>{escape(pep_abstract(full_path), quote=False)}</description>
<author>{escape(joined_authors, quote=False)}</author>
<guid isPermaLink="true">{url}</guid>
<pubDate>{_format_rfc_2822(dt)}</pubDate>
</item>"""
items.append(item)

# The rss envelope
Expand All @@ -175,28 +182,28 @@ def main():
language features, and some meta-information like release
procedure and schedules.
"""

# Setup feed generator
fg = feed.FeedGenerator()
fg.language("en")
fg.generator("")
fg.docs("https://cyber.harvard.edu/rss/rss.html")

# Add metadata
fg.title("Newest Python PEPs")
fg.link(href="https://peps.python.org")
fg.link(href="https://peps.python.org/peps.rss", rel="self")
fg.description(" ".join(desc.split()))
fg.lastBuildDate(datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc))

# Add PEP information (ordered by newest first)
for item in items:
fg.add_entry(item)
last_build_date = _format_rfc_2822(datetime.datetime.utcnow())
items = "\n".join(reversed(items))
output = f"""\
<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>Newest Python PEPs</title>
<link>https://peps.python.org/peps.rss</link>
<description>{" ".join(desc.split())}</description>
<atom:link href="https://peps.python.org/peps.rss" rel="self"/>
<docs>https://cyber.harvard.edu/rss/rss.html</docs>
<language>en</language>
<lastBuildDate>{last_build_date}</lastBuildDate>
{items}
</channel>
</rss>
"""

# output directory for target HTML files
out_dir = PEP_ROOT / "build"
out_dir.mkdir(exist_ok=True)
out_dir.joinpath("peps.rss").write_bytes(fg.rss_str(pretty=True))
out_dir = PEP_ROOT / args.output_dir
out_dir.mkdir(exist_ok=True, parents=True)
out_dir.joinpath("peps.rss").write_text(output)


if __name__ == "__main__":
Expand Down
17 changes: 3 additions & 14 deletions pep-0013.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ Current steering council
The current steering council consists of:

* Brett Cannon
* Emily Morehouse
* Gregory P. Smith
* Pablo Galindo Salgado
* Petr Viktorin
* Thomas Wouters

Per the results of the vote tracked in :pep:`8103`.
Per the results of the vote tracked in :pep:`8104`.

The core team consists of those listed in the private
https://github.com/python/voters/ repository which is publicly
Expand Down Expand Up @@ -287,7 +287,7 @@ active privileges like voting or nominating for the steering council,
and commit access.

The initial active core team members will consist of everyone
currently listed in the `"Python core" team on Github
currently listed in the `"Python core" team on GitHub
<https://github.com/orgs/python/teams/python-core/members>`__ (access
granted for core members only), and the
initial inactive members will consist of everyone else who has been a
Expand Down Expand Up @@ -357,14 +357,3 @@ Copyright
=========

This document has been placed in the public domain.



..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:
Loading