• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / multidict / 37733835205
86%

Build:
DEFAULT BRANCH: master
Ran 08 Oct 2026 05:45AM UTC
Jobs 1
Files 49
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Oct 2026 05:43AM UTC coverage: 85.962%. Remained the same
37733835205

push

github

web-flow
Rewrite md_eq_to_mapping() on top of md_walk_all() (#1745)

<!-- Thank you for your contribution! -->

## What do these changes do?

Rewrites `_md_eq_to_mapping_locked()` in `hashtable.h` on top of
`md_walk_all()`, as #1742 and #1744 did for `md_repr()` and
`md_update_from_ht()`. The hand-written entry loop becomes a visitor
that looks each key up in the other mapping and compares the values; the
version check now lives in the walk. The pure-Python backend is
unaffected.

The shared walk costs `multidict == dict`: about 33 more instructions
per entry, so 10-14% on `MultiDict` and 5-6% on `CIMultiDict` on GIL,
8-11% and 4-5% on FT. Numbers are in the footer.

## Are there changes in behavior for the user?

Only in a corner case: when the other mapping's `__getitem__` or a
value's `__eq__` mutates the multidict and that same entry compares
unequal, `==` now raises `RuntimeError` instead of returning `False`.
The result of a comparison that mutates its operands was already
unspecified, as for `dict`.

## Is it a substantial burden for the maintainers to support this?

No; about 15 fewer lines of C.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes (N/A)
- [ ] 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); reviewed by @asvetlov.

<details>
<summary>Agent run details (optional, for reviewers)</summary>

Tests: `pytest -q` on 3.14.7 (4087 passed) and 3.14.7t (4072 passed);
pure-Python leg `MULTIDICT_NO_EXTENSIONS=1 pytest -q --no-c-extensions`
on 3.14.7 (1609 passed); `pytest -q -m "not leaks and not hypothesis and
not capi"` on 3.10.17 (3911 passed). Existing coverage:
`test_eq_value_mutates_dict`,
`test_scan... (continued)

793 of 1586 branches covered (50.0%)

Branch coverage included in aggregate %.

9360 of 10225 relevant lines covered (91.54%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 37733835205.1 08 Oct 2026 05:45AM UTC 98
85.96
GitHub Action Run
Source Files on build 37733835205
  • Tree
  • List 49
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37733835205
  • bea2a5e7 on github
  • Prev Build on master (#37732114291)
  • Next Build on master (#37735945154)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc