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

aio-libs / multidict / 37206750564
86%

Build:
DEFAULT BRANCH: master
Ran 04 Oct 2026 01:46PM 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 01:45PM UTC coverage: 86.01%. Remained the same
37206750564

push

github

web-flow
Merge the bodies of __init__(), extend(), update() and merge() (#1673)

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

## What do these changes do?

`__init__()`, `extend()`, `update()` and `merge()` in `_multidict.c`
were four copies of the same structure: parse the arguments, pick one of
three locking arms by the type of the source, run the batch, flush the
watchers. They now share `_multidict_bulk()` and
`_multidict_bulk_locked()`, which removes about 140 lines from
`_multidict.c`.

Both helpers are `ALWAYS_INLINE` and take the operation as a constant,
so every entry point still compiles its own copy, as the
`check_inlining.py` rule from #1591 requires; the rule now names
`_multidict_bulk`.

`md_post_update()` moves out of line. Left to GCC it was inlined into
one arm of `update()`, and on free-threaded builds that took
`Py_NewRef()` out of the items iterator (+5 instructions per step) and
`list_getitem_ref()` out of the constructor loop. There is no way to
express a `NOINLINE` pin as a rule in `check_inlining.py`, so the
comment on the function carries the reason.

No behaviour change. The pure-Python implementation is not affected.

Measured with callgrind, before and after, on 3.14.7 and 3.14.7t, both
classes:

- `benchmarks/callgrind_driver.py --include-multidict-only`: every row
within 0.06%.
- The four entry points themselves, with a list, a dict, a multidict of
the same class, one of the other class, and keyword arguments only as
the source: all 80 cells between -0.12% and +0.29%. `merge()` is the
consistent mover, about +0.1% to +0.2% (roughly 20 to 30 instructions
per call) for the call to `md_post_update()`.

## 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

- [x] I think the code is well written
- [x] Unit tests for the changes exist (the existing suite; no behaviour
change)
- [x] Documentation reflects the changes (N/A)
- ... (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 - 37206750564.1 04 Oct 2026 01:46PM UTC 98
86.01
GitHub Action Run
Source Files on build 37206750564
  • 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 #37206750564
  • af7206f2 on github
  • Prev Build on master (#37203632573)
  • Next Build on master (#37211102432)
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