From a34d74424aaa336455c118e259391176b7c93eb7 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 8 Mar 2026 11:13:03 +0000 Subject: [PATCH 1/3] Add blog post on codebase growth --- content/authors/Stan Ulbrych.json | 11 + .../cpython_growth.svg | 23457 ++++++++++++++++ .../posts/cpython-codebase-growth/index.md | 16 + keystatic.config.tsx | 1 + 4 files changed, 23485 insertions(+) create mode 100644 content/authors/Stan Ulbrych.json create mode 100644 content/posts/cpython-codebase-growth/cpython_growth.svg create mode 100644 content/posts/cpython-codebase-growth/index.md diff --git a/content/authors/Stan Ulbrych.json b/content/authors/Stan Ulbrych.json new file mode 100644 index 0000000..8b99af0 --- /dev/null +++ b/content/authors/Stan Ulbrych.json @@ -0,0 +1,11 @@ +{ + "name": "Stan Ulbrych", + "bio": "", + "github": "StanFromIreland", + "avatar": "", + "twitter": "", + "bluesky": "https://bsky.app/profile/stan.ulbrych.org", + "mastodon": "https://mastodon.social/@stanfromireland", + "website": "https://stan.ulbrych.org", + "featured": false +} diff --git a/content/posts/cpython-codebase-growth/cpython_growth.svg b/content/posts/cpython-codebase-growth/cpython_growth.svg new file mode 100644 index 0000000..a4a5556 --- /dev/null +++ b/content/posts/cpython-codebase-growth/cpython_growth.svg @@ -0,0 +1,23457 @@ + + + + + + + + 2026-03-08T09:43:39.412325 + image/svg+xml + + + Matplotlib v3.10.0, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/posts/cpython-codebase-growth/index.md b/content/posts/cpython-codebase-growth/index.md new file mode 100644 index 0000000..89ef22a --- /dev/null +++ b/content/posts/cpython-codebase-growth/index.md @@ -0,0 +1,16 @@ +--- +title: 'CPython: 36 Years of Source Code' +publishDate: 2026-08-03 +author: Stan Ulbrych +description: >- + An analysis of the growth of CPython's codebase from its first commits to the + present day +tags: + - history +published: true +--- +![](cpython_growth.svg) + +While working on a patch and navigating through CPython, I got curious as to how the codebase has grown over the years. Using an interesting tool I found on the internet to *count lines of code* ([cloc](https://github.com/AlDanial/cloc)), some scripts, and some patience (thank goodness for multiple cores, or I’d be at this all day), I amassed a [1392 commit dataset.](https://gist.github.com/StanFromIreland/bd33d5ee3c59c54cbe1f3bad2fbdb4e9) With that, and some git spelunking for the annotations, I was able to generate the above graph. + +Many thanks to Tim and Ned for their help with this little project! I plan to tidy my scripts and upload them to a repository sometime in the near future. Please feel free to use my dataset :-) diff --git a/keystatic.config.tsx b/keystatic.config.tsx index cfdb2f4..84505d8 100644 --- a/keystatic.config.tsx +++ b/keystatic.config.tsx @@ -36,6 +36,7 @@ const knownTags = [ "docs", "contributors", "buildbot", + "history", ]; const referenceComponents = { From 87f0fcda2518b6f0fea0f1ea995a178bc16bb0c8 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 8 Mar 2026 11:34:53 +0000 Subject: [PATCH 2/3] Update chart a little --- .../cpython_growth.svg | 329 +++++------------- 1 file changed, 86 insertions(+), 243 deletions(-) diff --git a/content/posts/cpython-codebase-growth/cpython_growth.svg b/content/posts/cpython-codebase-growth/cpython_growth.svg index a4a5556..f452b4d 100644 --- a/content/posts/cpython-codebase-growth/cpython_growth.svg +++ b/content/posts/cpython-codebase-growth/cpython_growth.svg @@ -6,7 +6,7 @@ - 2026-03-08T09:43:39.412325 + 2026-03-08T11:34:35.530422 image/svg+xml @@ -39,7 +39,7 @@ z - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - + @@ -19698,7 +19698,7 @@ z - + @@ -19761,7 +19761,7 @@ z - + @@ -19777,7 +19777,7 @@ z - + @@ -19793,7 +19793,7 @@ z - + @@ -19809,7 +19809,7 @@ z - + @@ -19825,7 +19825,7 @@ z - + @@ -19841,208 +19841,208 @@ z - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -20051,12 +20051,12 @@ L 0 2 - - + @@ -20086,7 +20086,7 @@ z - + @@ -20102,7 +20102,7 @@ z - + @@ -20143,7 +20143,7 @@ z - + @@ -20159,7 +20159,7 @@ z - + @@ -20175,7 +20175,7 @@ z - + @@ -20191,7 +20191,7 @@ z - + @@ -20442,77 +20442,77 @@ z +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p1a9b7da205)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> - - + + - - - - - - - - @@ -23261,18 +23116,6 @@ z - - - - - - - - - - - - @@ -23450,7 +23293,7 @@ z - + From b9ff2f641314d7a7074aa5e05eeee277d0dae2c7 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 8 Mar 2026 15:26:10 +0000 Subject: [PATCH 3/3] Hugo's review Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .../{Stan Ulbrych.json => stan-ulbrych.json} | 2 +- .../cpython_growth.svg | 320 +++++++++++------- .../posts/cpython-codebase-growth/index.md | 4 +- 3 files changed, 204 insertions(+), 122 deletions(-) rename content/authors/{Stan Ulbrych.json => stan-ulbrych.json} (82%) diff --git a/content/authors/Stan Ulbrych.json b/content/authors/stan-ulbrych.json similarity index 82% rename from content/authors/Stan Ulbrych.json rename to content/authors/stan-ulbrych.json index 8b99af0..f52d6e4 100644 --- a/content/authors/Stan Ulbrych.json +++ b/content/authors/stan-ulbrych.json @@ -1,6 +1,6 @@ { "name": "Stan Ulbrych", - "bio": "", + "bio": "Python patcher, PSRT member, and translator", "github": "StanFromIreland", "avatar": "", "twitter": "", diff --git a/content/posts/cpython-codebase-growth/cpython_growth.svg b/content/posts/cpython-codebase-growth/cpython_growth.svg index f452b4d..d53e25b 100644 --- a/content/posts/cpython-codebase-growth/cpython_growth.svg +++ b/content/posts/cpython-codebase-growth/cpython_growth.svg @@ -6,7 +6,7 @@ - 2026-03-08T11:34:35.530422 + 2026-03-08T15:21:31.848372 image/svg+xml @@ -39,7 +39,7 @@ z - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - + @@ -19698,7 +19698,7 @@ z - + @@ -19761,7 +19761,7 @@ z - + @@ -19777,7 +19777,7 @@ z - + @@ -19793,7 +19793,7 @@ z - + @@ -19809,7 +19809,7 @@ z - + @@ -19825,7 +19825,7 @@ z - + @@ -19841,208 +19841,208 @@ z - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -20051,12 +20051,12 @@ L 0 2 - - + @@ -20086,7 +20086,7 @@ z - + @@ -20102,7 +20102,7 @@ z - + @@ -20143,7 +20143,7 @@ z - + @@ -20159,7 +20159,7 @@ z - + @@ -20175,7 +20175,7 @@ z - + @@ -20191,7 +20191,7 @@ z - + @@ -20442,77 +20442,77 @@ z +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> +" clip-path="url(#p051d8fe6bc)" style="fill: none; stroke-dasharray: 0.5,0.825; stroke-dashoffset: 0; stroke: #000000; stroke-width: 0.5"/> - - + @@ -22438,8 +22438,8 @@ z - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + @@ -22657,17 +22703,17 @@ z - + @@ -22686,8 +22732,42 @@ z - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + @@ -23293,7 +23375,7 @@ z - + diff --git a/content/posts/cpython-codebase-growth/index.md b/content/posts/cpython-codebase-growth/index.md index 89ef22a..bd66567 100644 --- a/content/posts/cpython-codebase-growth/index.md +++ b/content/posts/cpython-codebase-growth/index.md @@ -9,8 +9,8 @@ tags: - history published: true --- -![](cpython_growth.svg) +![Stacked area chart showing CPython's growth from a few lines in 1990 to 2.9 million lines in 2026, broken down by language](cpython_growth.svg) -While working on a patch and navigating through CPython, I got curious as to how the codebase has grown over the years. Using an interesting tool I found on the internet to *count lines of code* ([cloc](https://github.com/AlDanial/cloc)), some scripts, and some patience (thank goodness for multiple cores, or I’d be at this all day), I amassed a [1392 commit dataset.](https://gist.github.com/StanFromIreland/bd33d5ee3c59c54cbe1f3bad2fbdb4e9) With that, and some git spelunking for the annotations, I was able to generate the above graph. +While working on a patch and navigating through CPython, I got curious as to how the codebase has grown over the years. Using an interesting tool I found on the internet to *count lines of code* ([cloc](https://github.com/AlDanial/cloc)), some scripts, and some patience (thank goodness for multiple cores, or I’d be at this all day), I amassed a [1,392 commit dataset.](https://gist.github.com/StanFromIreland/bd33d5ee3c59c54cbe1f3bad2fbdb4e9) With that, and some Git spelunking for the annotations, I was able to generate the above graph. Many thanks to Tim and Ned for their help with this little project! I plan to tidy my scripts and upload them to a repository sometime in the near future. Please feel free to use my dataset :-)