Skip to content

Commit

Permalink
Merge branch 'main' into ww/new-tls-pep
Browse files Browse the repository at this point in the history
  • Loading branch information
woodruffw authored Sep 24, 2024
2 parents 2979fef + 680c8b1 commit ec5c4c2
Show file tree
Hide file tree
Showing 68 changed files with 7,573 additions and 2,170 deletions.
4 changes: 4 additions & 0 deletions .codespell/exclude-file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@

explicitly declared using ``in``, ``out`` and ``inout`` keywords.
| | | | | | | inout |

>>> "abd\

* ``Is``, ``IsNot``, ``In``, and ``NotIn`` are not supported
5 changes: 5 additions & 0 deletions .codespell/ignore-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ arithmetics
asend
ba
ccompiler
checkin
clos
complies
crate
dedented
discernable
dota
extraversion
falsy
Expand All @@ -18,10 +20,13 @@ groth
iif
implementor
implementors
loath
nd
ned
re-usable
re-use
re-used
re-using
recuse
reenable
referencable
Expand Down
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[codespell]
skip = ./.git
skip = ./.git,./.codespellrc,./build,./ruff_cache,./.venv
ignore-words = .codespell/ignore-words.txt
exclude-file = .codespell/exclude-file.txt
uri-ignore-words-list = daa,ist,searchin,theses
49 changes: 28 additions & 21 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ peps/pep-0012.rst @brettcannon @warsaw
peps/pep-0012/ @brettcannon
# peps/pep-0013.rst is owned by the entire core team.
# ...
peps/pep-0020.rst @tim-one
#peps/pep-0020.rst
# ...
peps/pep-0042.rst @jeremyhylton
# ...
peps/pep-0100.rst @malemburg
peps/pep-0101.rst @Yhg1s @pablogsal @ambv @ned-deily
peps/pep-0101.rst @hugovk @Yhg1s @pablogsal @ambv @ned-deily
peps/pep-0102.rst @warsaw @gvanrossum
# peps/pep-0103.rst
# ...
Expand Down Expand Up @@ -79,7 +79,7 @@ peps/pep-0218.rst @rhettinger
# peps/pep-0220.rst
peps/pep-0221.rst @Yhg1s
# peps/pep-0222.rst
peps/pep-0223.rst @tim-one
# peps/pep-0223.rst
peps/pep-0224.rst @malemburg
# peps/pep-0225.rst
peps/pep-0226.rst @jeremyhylton
Expand All @@ -91,8 +91,8 @@ peps/pep-0231.rst @warsaw
peps/pep-0232.rst @warsaw
# peps/pep-0233.rst
peps/pep-0234.rst @gvanrossum
peps/pep-0235.rst @tim-one
peps/pep-0236.rst @tim-one
# peps/pep-0235.rst
# peps/pep-0236.rst
peps/pep-0237.rst @gvanrossum
peps/pep-0238.rst @gvanrossum
# peps/pep-0239.rst
Expand All @@ -111,7 +111,7 @@ peps/pep-0251.rst @warsaw @gvanrossum
peps/pep-0252.rst @gvanrossum
peps/pep-0253.rst @gvanrossum
peps/pep-0254.rst @gvanrossum
peps/pep-0255.rst @nascheme @tim-one
peps/pep-0255.rst @nascheme
# peps/pep-0256.rst
peps/pep-0257.rst @gvanrossum
# peps/pep-0258.rst
Expand Down Expand Up @@ -162,7 +162,7 @@ peps/pep-0302.rst @pfmoore
# peps/pep-0304.rst
# peps/pep-0305.rst
peps/pep-0306.rst @jackdied @ncoghlan @benjaminp
peps/pep-0307.rst @gvanrossum @tim-one
peps/pep-0307.rst @gvanrossum
peps/pep-0308.rst @gvanrossum @rhettinger
# peps/pep-0309.rst
peps/pep-0310.rst @pfmoore
Expand Down Expand Up @@ -354,17 +354,17 @@ peps/pep-0490.rst @vstinner
peps/pep-0492.rst @1st1
peps/pep-0493.rst @ncoghlan @malemburg
peps/pep-0494.rst @ned-deily
peps/pep-0495.rst @abalkin @tim-one
peps/pep-0495-gap.png @abalkin @tim-one
peps/pep-0495-gap.svg @abalkin @tim-one
peps/pep-0495-fold.svg @abalkin @tim-one
peps/pep-0495-fold-2.png @abalkin @tim-one
peps/pep-0495-daylightsavings.png @abalkin @tim-one
peps/pep-0495.rst @abalkin
peps/pep-0495-gap.png @abalkin
peps/pep-0495-gap.svg @abalkin
peps/pep-0495-fold.svg @abalkin
peps/pep-0495-fold-2.png @abalkin
peps/pep-0495-daylightsavings.png @abalkin
# peps/pep-0496.rst
# peps/pep-0497.rst
peps/pep-0498.rst @ericvsmith
# peps/pep-0499.rst
peps/pep-0500.rst @abalkin @tim-one
peps/pep-0500.rst @abalkin
peps/pep-0501.rst @ncoghlan
# peps/pep-0502.rst
peps/pep-0503.rst @dstufft
Expand Down Expand Up @@ -442,7 +442,7 @@ peps/pep-0568.rst @njsmith
peps/pep-0569.rst @ambv
peps/pep-0570.rst @larryhastings @pablogsal
# peps/pep-0571.rst
peps/pep-0572.rst @tim-one @gvanrossum
peps/pep-0572.rst @gvanrossum
peps/pep-0573.rst @encukou @ncoghlan @ericsnowcurrently
peps/pep-0574.rst @pitrou
# peps/pep-0575.rst
Expand Down Expand Up @@ -562,7 +562,7 @@ peps/pep-0678.rst @iritkatriel
peps/pep-0679.rst @pablogsal
peps/pep-0680.rst @encukou
peps/pep-0681.rst @jellezijlstra
peps/pep-0682.rst @mdickinson
peps/pep-0682.rst
peps/pep-0683.rst @ericsnowcurrently
peps/pep-0684.rst @ericsnowcurrently
# peps/pep-0684.rst
Expand Down Expand Up @@ -610,7 +610,7 @@ peps/pep-0727.rst @JelleZijlstra
peps/pep-0728.rst @JelleZijlstra
peps/pep-0729.rst @JelleZijlstra @hauntsaninja
peps/pep-0730.rst @ned-deily
peps/pep-0731.rst @gvanrossum @encukou @vstinner @zooba @erlend-aasland
peps/pep-0731.rst @encukou @vstinner @zooba @erlend-aasland @serhiy-storchaka @mdboom
peps/pep-0732.rst @Mariatta
peps/pep-0733.rst @encukou @vstinner @zooba @iritkatriel
peps/pep-0734.rst @ericsnowcurrently
Expand All @@ -621,17 +621,24 @@ peps/pep-0738.rst @encukou
peps/pep-0740.rst @dstufft
peps/pep-0741.rst @vstinner
peps/pep-0742.rst @JelleZijlstra
peps/pep-0743.rst @vstinner
peps/pep-0744.rst @brandtbucher
peps/pep-0743.rst @vstinner @encukou
peps/pep-0744.rst @brandtbucher @savannahostrowski
peps/pep-0745.rst @hugovk
peps/pep-0746.rst @JelleZijlstra
peps/pep-0747.rst @JelleZijlstra
peps/pep-0748.rst @ncoghlan
# ...
peps/pep-0749.rst @JelleZijlstra
# ...
peps/pep-0747.rst @JelleZijlstra
peps/pep-0750.rst @gvanrossum @lysnikolaou
peps/pep-0751.rst @brettcannon
peps/pep-0752.rst @warsaw
peps/pep-0753.rst @warsaw
# ...
# peps/pep-0754.rst
# ...
peps/pep-0756.rst @vstinner
peps/pep-0757.rst @vstinner
peps/pep-0789.rst @njsmith
# ...
peps/pep-0801.rst @warsaw
Expand Down Expand Up @@ -706,7 +713,7 @@ peps/pep-3156.rst @gvanrossum
# peps/pep-3333.rst
# ...
peps/pep-8000.rst @warsaw
peps/pep-8001.rst @brettcannon @tiran @dstufft @ericsnowcurrently @gpshead @ambv @Mariatta @njsmith @pablogsal @rhettinger @taleinat @tim-one @zware
peps/pep-8001.rst @brettcannon @tiran @dstufft @ericsnowcurrently @gpshead @ambv @Mariatta @njsmith @pablogsal @rhettinger @taleinat @zware
peps/pep-8002.rst @warsaw @ambv @pitrou @dhellmann @willingc
peps/pep-8010.rst @warsaw
peps/pep-8011.rst @Mariatta @warsaw
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ default_stages: [commit]
repos:
# General file checks and fixers
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: mixed-line-ending
name: "Normalize mixed line endings"
Expand Down Expand Up @@ -43,17 +43,17 @@ repos:
name: "Check YAML"

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
rev: 24.4.2
hooks:
- id: black
name: "Format with Black"
args:
- '--target-version=py39'
- '--target-version=py310'
files: 'pep_sphinx_extensions/tests/.*'
files: '^(peps/conf\.py|pep_sphinx_extensions/tests/.*)$'

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.5.1
hooks:
- id: ruff
name: "Lint with Ruff"
Expand Down Expand Up @@ -89,7 +89,7 @@ repos:

# Manual codespell check
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
name: "Check for common misspellings in text files"
Expand Down
49 changes: 24 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
# You can set these variables from the command line.
PYTHON = python3
VENVDIR = .venv
UV = uv
# synchronise with render.yml -> deploy step
BUILDDIR = build
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
BUILDER = html
JOBS = auto
SOURCES =
REQUIREMENTS = requirements.txt
SPHINXERRORHANDLING = --fail-on-warning --keep-going --warning-file sphinx-warnings.txt

ALLSPHINXOPTS = --builder $(BUILDER) \
Expand All @@ -26,17 +28,13 @@ html: venv
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"

.PHONY: ensure-sphinx-autobuild
ensure-sphinx-autobuild: venv
$(call ensure_package,sphinx-autobuild)

## htmllive to rebuild and reload HTML files in your browser
.PHONY: htmllive
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
htmllive: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-autobuild
# Arbitrarily selected ephemeral port between 49152–65535
# to avoid conflicts with other processes:
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/" --open-browser --delay 0 --port 55302
htmllive: ensure-sphinx-autobuild html
htmllive: _ensure-sphinx-autobuild html

## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: dirhtml
Expand All @@ -48,15 +46,10 @@ dirhtml: html
linkcheck: BUILDER = linkcheck
linkcheck: html

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

## clean to remove the venv and build files
.PHONY: clean
clean: clean-venv
-rm -rf build topic
-rm -rf $(BUILDDIR)

## clean-venv to remove the venv
.PHONY: clean-venv
Expand All @@ -71,29 +64,36 @@ venv:
echo "To recreate it, remove it first with \`make clean-venv'."; \
else \
echo "Creating venv in $(VENVDIR)"; \
if uv --version > /dev/null; then \
uv venv $(VENVDIR); \
VIRTUAL_ENV=$(VENVDIR) uv pip install -r requirements.txt; \
if $(UV) --version >/dev/null 2>&1; then \
$(UV) venv $(VENVDIR); \
VIRTUAL_ENV=$(VENVDIR) $(UV) pip install -r $(REQUIREMENTS); \
else \
$(PYTHON) -m venv $(VENVDIR); \
$(VENVDIR)/bin/python3 -m pip install --upgrade pip; \
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt; \
$(VENVDIR)/bin/python3 -m pip install -r $(REQUIREMENTS); \
fi; \
echo "The venv has been created in the $(VENVDIR) directory"; \
fi

define ensure_package
if uv --version > /dev/null; then \
$(VENVDIR)/bin/python3 -m $(1) --version > /dev/null || VIRTUAL_ENV=$(VENVDIR) uv pip install $(1); \
.PHONY: _ensure-package
_ensure-package: venv
if $(UV) --version >/dev/null 2>&1; then \
VIRTUAL_ENV=$(VENVDIR) $(UV) pip install $(PACKAGE); \
else \
$(VENVDIR)/bin/python3 -m $(1) --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install $(1); \
$(VENVDIR)/bin/python3 -m pip install $(PACKAGE); \
fi
endef

.PHONY: _ensure-pre-commit
_ensure-pre-commit:
$(MAKE) _ensure-package PACKAGE=pre-commit

.PHONY: _ensure-sphinx-autobuild
_ensure-sphinx-autobuild:
$(MAKE) _ensure-package PACKAGE=sphinx-autobuild

## lint to lint all the files
.PHONY: lint
lint: venv
$(call ensure_package,pre_commit)
lint: _ensure-pre-commit
$(VENVDIR)/bin/python3 -m pre_commit run --all-files

## test to test the Sphinx extensions for PEPs
Expand All @@ -103,8 +103,7 @@ test: venv

## spellcheck to check spelling
.PHONY: spellcheck
spellcheck: venv
$(call ensure_package,pre_commit)
spellcheck: _ensure-pre-commit
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell

.PHONY: help
Expand Down
2 changes: 1 addition & 1 deletion pep_sphinx_extensions/generate_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def create_rss_feed(doctree_dir: Path, output_dir: Path):
<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>
<link>https://peps.python.org/</link>
<description>{RSS_DESCRIPTION}</description>
<atom:link href="https://peps.python.org/peps.rss" rel="self"/>
<docs>https://cyber.harvard.edu/rss/rss.html</docs>
Expand Down
7 changes: 7 additions & 0 deletions pep_sphinx_extensions/pep_zero_generator/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ def write_pep0(
self.emit_newline()
self.emit_newline()

self.emit_title("API")
self.emit_text(
"The `PEPS API <api/peps.json>`__ is a JSON file of metadata about "
"all the published PEPs. :doc:`Read more here <api/index>`."
)
self.emit_newline()

# PEPs by category
self.emit_title("Index by Category")
meta, info, provisional, accepted, open_, finished, historical, deferred, dead = _classify_peps(peps)
Expand Down
Loading

0 comments on commit ec5c4c2

Please sign in to comment.