Vinayak Mehta

Day 43 — Mysterious PEPs and where to find them

Oct 07, 2020 · recurse-center

I've been reading (and forgetting about) a lot of PEPs lately. When you read a PEP, it mentions how "this" thing was defined in "this" PEP, and how "that" thing was defined in "this other" PEP. So I thought that it would be cool to look at all the PEPs a PEP mentions in it.

Today I took a break from things that I've been working on for some time, and looked into visualizing PEP references on a graph using d3! You can check it out at python-peps-graph.glitch.me. You can scroll to zoom into the graph, click and drag to move around, and then click on a PEP to see which other PEPs it refers to:

demo

I want to add two more features (maybe next week):

  • A search box
  • A node tooltip which shows the authors and a link to the PEP

There are so many other types of visualizations that can be built around PEPs! For example, a timeline-type visualization like python-release-cycle.glitch.me that shows when a PEP was first created and when it was accepted / deferred / etc.

I also discovered some PEPs that mention some non-existent PEPs (and some [bug]s in my own code which extracts this data!):

  • PEP 42 mentions PEP 0 which is an index of PEPs. It does not exist as a .txt or .rst file (using which I generate the data), but created on the fly when HTML is generated.
  • PEP 287 mentions PEP 9876 -- Let's Hope We Never Get Here!
  • PEP 12 mentions PEP 9999. PEP 12 is a sample PEP that you can use as a template to submit a new PEP, it asks you to change the header to PEP 9999 till you have a PEP number assignment.
  • [bug] PEPs 3125 and 3126 mention PEP 30XZ, which is the subject of an old email from 2007.
  • [bug] PEP 258 mentions PEP: RFC-822!
  • [bug] PEP 440 mentions PEP440: >1.7 vs >=1.7!

I've fixed those bugs by checking for some of these non-existent PEPs for now!