Repository navigation
Add cpython-source-code-guide materials folder - #1010
Merged
realpython-bot merged 2 commits intoDec 6, 2026
Merged
Conversation
Scripts from the CPython 3.15.2 update of 'Your Guide to the CPython Source Code'. test_tokens.py is excluded from ruff because the tutorial's tokenize output depends on its exact 3-space indentation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realpython-bot
deleted the
maintenance/cpython-source-code-guide-20261205
branch
December 6, 2026 07:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a materials folder for the updated tutorial Your Guide to the CPython Source Code. The article was rewritten against CPython 3.15.2 (update draft: https://realpython.com/pbjt/blog/post/2528/change/, card: https://trello.com/c/hZry588l).
Files (copied from the update draft's
filename=blocks and its generator REPL session):test_tokens.py,instaviz_example.py,instaviz_example_power.py,instaviz_compiler.py,trace_opcodes.py,example_stack.py,generator_example.pyrequirements.txtpinsinstaviz==0.6.0, which matches the article'sdependenciesfieldREADME.mdwith setup and a per-file usage tablepyproject.toml: excludescpython-source-code-guide/test_tokens.pyfrom ruff. The tutorial'stokenize -eoutput shows that file's 3-space indent and column offsets, so formatting it would make the output in the article wrong. This follows the existinghow-to-indent-in-python/sample_code.pyexclude.Verification:
test_tokens.py,trace_opcodes.py,example_stack.py, andgenerator_example.pyran on a--with-pydebugbuild of the v3.15.2 tag, and their output matches the article.instaviz==0.6.0, and each served HTTP 200 onlocalhost:8080.ruff==0.14.1format --checkandcheckpass, and so doesdircheck.py.🤖 Generated with Claude Code