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

aio-libs / multidict / 38225306936
86%

Build:
DEFAULT BRANCH: master
Ran 12 Oct 2026 08:44AM UTC
Jobs 1
Files 50
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

12 Oct 2026 08:43AM UTC coverage: 86.054%. Remained the same
38225306936

push

github

web-flow
Pass one batch state through update() and merge(), give extend() its own helpers (#1763)

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

## What do these changes do?

`update()` and `merge()` now carry their batch in one
`md_update_state_t`: the multidict, the per-item action (`_md_update()`
or `_md_merge()`, picked once by `md_update_state_init()`), and the
update marks and deferred references embedded in the structure rather
than passed by pointer. Every source, a multidict, a dict or a sequence,
goes through one per-key helper, `_md_update_key()`, which borrows the
key's identity through `md_identity_or_new()` as `md_add()` does;
`md_update_from_ht()` hands it to `md_walk_all()` through a thin
visitor, so no helper switches on the operation per item. A same-class
walk gets its own visitor, `_md_update_visit_own()`, which uses the
walked identity and hash as they are.

`extend()` and the constructor need no batch state, so they get their
own helpers on the multidict alone: `md_extend_from_ht()`,
`md_extend_from_dict()`, `md_extend_from_seq()` and
`md_extend_from_kwnames()`. They share `_md_extend_item()`, which hands
each item's references straight to `md_add_with_hash_steal_refs()`.
`md_extend_self()` keeps its direct loops, since it adds to the table it
walks. A sequence is read by one loop, `_md_seq_walk()`, for all three
operations.

`tools/check_inlining.py` gains two rules, for `md_calc_identity_hash()`
in the getitem entry points (all but `MultiDict_GetItem()`) and for
`_md_unlink_at()` on GIL. An intermediate version of this branch with
two sequence loops pushed both out of line with GCC 15 through the
`inline-unit-growth` budget, costing `d[istr]` 3.5% on GIL and `pop()`
4% on FT. The rules cover only what CI's GCC 13 achieves too: it already
keeps `md_calc_identity_hash()` out of `MultiDict_GetItem()` and
`_md_unlink_at()` out of line on FT at the merge base.

C extension only; the pure-Python backend has no counterpart.

## Are there changes ... (continued)

832 of 1664 branches covered (50.0%)

Branch coverage included in aggregate %.

9757 of 10641 relevant lines covered (91.69%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 38225306936.1 12 Oct 2026 08:44AM UTC 100
86.05
GitHub Action Run
Source Files on build 38225306936
  • Tree
  • List 50
  • 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 #38225306936
  • 1cb59f6c on github
  • Prev Build on master (#38173811595)
  • Next Build on master (#38225593874)
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