Skip to content

Materials for Python 3.15 Preview: frozendict - #812

Merged
realpython-bot merged 5 commits into
masterfrom
python315-frozendict
Sep 20, 2026
Merged

realpython-bot merged 5 commits into
masterfrom
python315-frozendict

Conversation

@bzaczynski

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

bzaczynski and others added 3 commits September 18, 2026 13:33
The docstring said orders 1002 and 1003 both survive twice because their
fetched_at timestamps differ. That only holds for 1002. The 1003 rows also
disagree on amount (42.00 vs 99.00), so ignoring fetched_at merges 1002 but
leaves 1003 split, which is what the script already prints.

The output omitted the amount column, so the field that explains the result
was the one field readers couldn't see. Matches the tutorial's output block.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@realpython-bot realpython-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final QA review for the tutorial (post 2291).

Verified against a real Python 3.15.0rc2 build (python-build-standalone 20260901) — CI can't cover this, since it runs 3.14 and this folder is excluded from ruff:

  • All 9 scripts execute and their output matches the tutorial's transcripts exactly, including the scaled-planet spacing in planets.py, CacheInfo(hits=1, misses=1, ...) in memoize.py/cache.py, and the token-leak demo in safe_defaults.py.
  • exposure.py exits on an uncaught TypeError by design.
  • README.md title and the https://realpython.com/python315-frozendict/ link are correct.
  • The dedupe_csv.py print() wrapping here is the form I've now adopted in the article, so the two match.

Non-blocking notes left as a comment. Approving so the opt-in download URL stops 404ing ahead of tomorrow's publication.

@realpython-bot

Copy link
Copy Markdown
Collaborator

Non-blocking notes from Final QA — none of these gate the merge, but worth a follow-up:

  1. cache.py looks redundant. memoize.py is a strict superset — same render_report(), plus a docstring, main(), a __main__ guard, and the dictTypeError path. Consider dropping cache.py.
  2. README is a 3-line stub. Six of the nine files fail with a bare NameError: name 'frozendict' is not defined on 3.14 with no explanation. python315-lazy-imports/README.md states the version requirement in bold — worth one sentence here too, ideally also noting that exposure.py raises on purpose.
  3. dedupe_csv.py prints a line the tutorial doesn't show. The identity/by_order section emits Ignoring fetched_at leaves 4 orders., which isn't in the article's output block. The prose does describe the behaviour, so the numbers agree, but the download says more than the article does.
  4. events.py drops len(stats)3, which is the exact result the tutorial's prose calls out ("Four calls produced three buckets").
  5. pyproject.toml churn. ai-benchmark and python315-lazy-imports are removed and re-added purely to reorder, and "python315-frozendict/" carries a trailing slash no other entry has.

For the record, the green Linux314 check validates almost nothing here: the PR excludes python315-frozendict/ from ruff (necessary — target-version = "py314" would flag frozendict as F821 in every file), and CI runs 3.14, so no file was linted, executed, or parsed. The 3.15.0rc2 run in my review is the only real coverage.

@realpython-bot
realpython-bot merged commit 1f752c6 into master Sep 20, 2026
1 check passed
@realpython-bot
realpython-bot deleted the python315-frozendict branch September 20, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants