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

aio-libs / multidict / 37211102432
86%

Build:
DEFAULT BRANCH: master
Ran 04 Oct 2026 02:57PM 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

04 Oct 2026 02:56PM UTC coverage: 86.01%. Remained the same
37211102432

push

github

web-flow
Use the key alone as the hole marker (#1674)

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

## What do these changes do?

`entry_is_hole()` tested the key in a compact table and the identity in
an anystr one. Every path that deletes an anystr entry clears both
fields under the critical section, and every insert sets both, so for
any caller holding the lock the key alone tells a hole. The helper now
reads `entry->key` in every kind, drops its `kind` argument and is
`ALWAYS_INLINE`. Lock-free readers never used it; they check the
identity slot through `try_get_ref()` and are unchanged.

The old kind-dependent test made GCC split the iterator and `popitem()`
scans into one loop per kind with a constant entry size; reading only
the key undid that and cost about 2 instructions per `__next__`. Those
two scans now branch on the kind by hand. `tools/check_inlining.py`
gained rules for `_iter_scan`, `_md_last_live` and `entry_is_hole`.

`_md_check_consistency()` now also asserts the reverse direction, that a
hole has a NULL key, so a path that clears one field without the other
trips debug builds.

The pure-Python implementation has no equivalent helper and is
unaffected.

## Are there changes in behavior for the user?

No.

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

No; it removes a per-kind branch from the walk loops.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist (N/A for new tests; covered by
the existing suite and the debug consistency check)
- [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`

Callgrind instructions per operation (`benchmarks/callgrind_driver.py
--include-multidict-only`, release builds). "Key only" is ... (continued)

792 of 1584 branches covered (50.0%)

Branch coverage included in aggregate %.

9315 of 10167 relevant lines covered (91.62%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 37211102432.1 04 Oct 2026 02:57PM UTC 98
86.01
GitHub Action Run
Source Files on build 37211102432
  • 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 #37211102432
  • e81a9413 on github
  • Prev Build on master (#37206750564)
  • Next Build on master (#37220670984)
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