Repository navigation
Tidy news fragments and refresh benchmark tables for 7.0.0 - #1597
Merged
Merged
Conversation
Fold fragments describing iterations on the C API, which is new in this release, into the entries that added it; drop superseded benchmark table refreshes and intermediate header names; rewrite present-tense phrasing.
asvetlov
marked this pull request as ready for review
September 26, 2026 07:43
Contributor
|
4 of 6 tasks
asvetlov
added a commit
that referenced
this pull request
Sep 26, 2026
<!-- Thank you for your contribution! --> ## What do these changes do? Finishes the 7.0.0 changelog and refreshes the benchmark tables, the part of #1597 that did not make it in before it merged. The four PRs that followed the bisect fix slowdowns introduced earlier in this cycle, so they are folded into the entries whose changes they amend rather than listed as speedups over 6.9.1. `1599` (one thread-local version counter) becomes a symlink to `1587`. `1598` (references in `update()` only when `lower()` can run code) becomes a symlink to `1581`, which now says the extra references are limited to those keys. `1600` and `1601` (out-of-line slot operations and insert-path resize) merge into one `1600` entry with `1601` symlinked to it. Towncrier lists both numbers under each merged entry. The tables in `docs/benchmark.rst` are refreshed per `RELEASE.md` step 2, collected at d66879b. Against the previous tables (6e6ac72), `for k, v in d.items()` needs 58% to 66% fewer instructions on both builds, `popitem()` 34% to 54% fewer, and `CIMultiDict` lookups 15% to 39% fewer; free-threaded `update()` got 8% to 13% cheaper. Three case-sensitive `MultiDict` rows stay 5% to 6% above the old tables: `del d[key]` on the GIL build (the watcher check from #1551, still open), and 20-item construction and `pop()` on the free-threaded build. The README and docs index quoted the pure-Python backend at "7 to 80 times" the C extension, a range that already left out the empty constructor at 105 times; they now give the average, about 40 times (geometric mean over the 20 operations: 38.5x `MultiDict`, 36.8x `CIMultiDict`). ## Are there changes in behavior for the user? No. ## Is it a substantial burden for the maintainers to support this? No. ## Related issue number Follow-up to #1597. ## Checklist - [x] I think the code is well written - [ ] Unit tests for the changes exist (N/A, docs and changelog only) - [x] Documentation reflects the changes - [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` (N/A) - [x] Add a new news fragment into the `CHANGES/` folder - [x] `make doc-spelling` passes and any new technical words are added to `docs/spelling_wordlist.txt` Drafted with Claude Code (Claude Opus 5.5); pending review by @asvetlov before leaving draft. <details> <summary>Agent run details (optional, for reviewers)</summary> Benchmarks: `benchmarks/callgrind_driver.py` on CPython 3.14.7 and 3.14.7t, fresh venv per build in a separate tree at d66879b, `__pycache__` warmed with `--self-check`, `.so` timestamps checked. The previous tables' commit 6e6ac72, re-measured earlier today in the same setup, reproduced them exactly, so the comparison above is between code, not environments. Changelog: `python -Im towncrier build --draft --version 7.0.0` renders the merged entries with both issue numbers. `make doc-spelling` passes. </details>
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.
What do these changes do?
Prepares the news fragments for 7.0.0.
The public C API (#1480) and the watchers API (#1551) are new in this release, so the fragments describing later changes to them describe states that never shipped. They are folded into the entries that added the APIs: the visitor's identity and hash (#1552, #1561) into
1478, and the 32-watcher limit, the watcher registration race fix and the failing-callback report (#1574, #1583, #1585) into1551. TheMultiDict_SetDefault(NULL)half of1553is dropped for the same reason.Intermediate header names that never shipped are removed as well:
1510no longer mentionsdeferred_decref.h, which #1530 merged intoreflist.h, and1513namesdebug.hdirectly, so1576goes.1572, a fix to a tool added this cycle, is folded into1529.1560and the last sentence of1556go too, since the release refresh of the benchmark tables supersedes those intermediate ones.Finally, the fragments that did not lead with a past-tense verb or described the change as "now ..." are rewritten per
AGENTS.md.It also refreshes the tables in
docs/benchmark.rstperRELEASE.mdstep 2; they were last collected at 6e6ac72 (#1563). Against that, most rows got faster:for k, v in d.items()58% to 66% fewer instructions on both builds,popitem()32% to 54%, andCIMultiDictlookups 12% to 38% (get()miss,pop(),setdefault()). Case-sensitiveMultiDictconstruction, insertion, deletion andpop()got 5% to 12% slower, most on the free-threaded build (cls(items)+10%, 20-itemcls(items)+12%,pop()+10%). The pure-Python slowdown quoted in the README and the docs index changes from a 7 to 80 times range, which already left out the empty constructor at 105 times, to its average: about 40 times (geometric mean over the 20 operations, 38x forMultiDictand 36x forCIMultiDict).Are there changes in behavior for the user?
No.
Is it a substantial burden for the maintainers to support this?
No.
Related issue number
N/A
Checklist
CONTRIBUTORS.txt(N/A)CHANGES/foldermake doc-spellingpasses and any new technical words are added todocs/spelling_wordlist.txtDrafted with Claude Code (Claude Opus 5.5); pending review by @asvetlov before leaving draft.
Agent run details (optional, for reviewers)
python -Im towncrier build --draft --version 7.0.0renders cleanly. The symlinked pairs1512->1492and1562->1555, and both1535fragments, are intentional and left alone.Benchmarks:
benchmarks/callgrind_driver.pyon CPython 3.14.7 and 3.14.7t, one fresh venv each in a separate tree,__pycache__warmed with--self-checkfirst. Control: 6e6ac72 re-measured in the same setup reproduces the old published table (for example 20-itemcls(items)4,163 anddictcolumns unchanged), so the environment is stable and theMultiDictslowdowns are real code changes between 6e6ac72 and 91d5329, not yet bisected.make doc-spellingpasses.