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

aio-libs / multidict / 35906912084
87%

Build:
DEFAULT BRANCH: master
Ran 23 Sep 2026 07:06PM UTC
Jobs 1
Files 42
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

23 Sep 2026 07:04PM UTC coverage: 87.399%. Remained the same
35906912084

push

github

web-flow
Give the list-pair helpers a header of their own (#1534)

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

## What do these changes do?

`_list_getitem_ref()` and `_list_item_gone()` were left behind in
`hashtable.h` by #1533 without being about the hash table, and with no
caller there any more. They move into a new
`multidict/_multilib/pair.h`, along with a new `unpack_pair()` that both
of their users now share: `itemsview.__contains__()` in `views.h` and
`_md_parse_item()` in `bulk_update.h` each kept their own copy of the
exact-tuple and exact-list fast paths, including the free-threaded
reference dance the list branch needs.

Each caller keeps its own slow path, because the two disagree on whether
a wrong length or a foreign type is an error or a plain "no";
`unpack_pair()` reports those back rather than acting on them. Folding
the wrong-length case into the foreign-type one, which would drop a
state
from the result, is wrong: it lets an exact list reach the general path,
which re-reads the length and then indexes without the atomic accessor.
`test_items_contains_list_shrunk_by_another_thread` catches it.

C extension only. There is no pure-Python counterpart to keep in sync,
since the split is a C header layout question; `_multidict_py.py` is
untouched.

## Are there changes in behavior for the user?

No.

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

No, it removes a duplicated fast path and finishes the split #1533
started.

## Related issue number

None; this is the follow-up #1533 pointed at when it left these two
helpers behind in `hashtable.h`.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist — N/A, no new behaviour; the
      existing suite covers both call sites, including the free-threaded
      `test_items_contains_list_shrunk_by_another_thread`
- [x] Documentation reflects the changes — `AGENTS.md` header table
- [ ] If you provide code modification, please add yourself to
`CO... (continued)

765 of 1530 branches covered (50.0%)

Branch coverage included in aggregate %.

7246 of 7636 relevant lines covered (94.89%)

1.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35906912084.1 23 Sep 2026 07:06PM UTC 84
87.4
GitHub Action Run
Source Files on build 35906912084
  • Tree
  • List 42
  • 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 #35906912084
  • 9f28f61d on github
  • Prev Build on master (#35906736075)
  • Next Build on master (#35913343317)
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