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

aio-libs / multidict / 37199292436
86%

Build:
DEFAULT BRANCH: master
Ran 04 Oct 2026 11:37AM 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 11:35AM UTC coverage: 86.01%. Remained the same
37199292436

push

github

web-flow
Drop dead code from the C extension (#1668)

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

## What do these changes do?

Remove code in the C extension that cannot run or only forwards:

- the `md == other` branch of `_md_update_from_ht()` and its comment:
every caller already routes a multidict updating from itself elsewhere
(`md_extend_self()`, or a no-op for `update()` and `merge()`), so an
`assert` replaces it;
- `#if PY_VERSION_HEX >= 0x030a00f0` around `Py_TPFLAGS_IMMUTABLETYPE`,
always true since 3.10 is the minimum;
- the `s < 0` check after `PyDict_GET_SIZE()`, and two `other != self ?
other : NULL` arguments in arms of `_multidict_tp_init()` that already
know the answer;
- the forwarders `_md_add_locked()`, `_md_get_all_locked()` and
`_md_pop_item()`;
- an unreachable `return` and a stray `;` in `md_eq()`.

`_MD_NEED_LOCK` is also defined before its first use, which was a
literal `2` with a comment.

The pure-Python implementation is not affected.

The guards, `md_eq()`, `_md_add_locked()` and `_MD_NEED_LOCK` edits
leave the generated code identical (`tools/codegen_diff.py` against the
merge base, 3.14.7 and 3.14.7t). The others shift GCC's inlining
decisions, so they were measured with `benchmarks/callgrind_driver.py
--include-multidict-only`, before and after, per build. Rows that moved
by more than 0.3%, in instructions per operation:

| build | class | row | before | after | change |
| --- | --- | --- | --- | --- | --- |
| GIL | `MultiDict` | `getitem_istr` | 746.8 | 729.7 | -2.29% |
| GIL | `MultiDict` | `setitem_istr` | 871.2 | 855.9 | -1.76% |
| GIL | `MultiDict` | `popitem` | 487.4 | 485.4 | -0.41% |
| FT | `MultiDict` | `reinit_clone_small` | 2705.0 | 2689.0 | -0.59% |
| FT | `MultiDict` | `setitem_istr` | 984.9 | 980.7 | -0.43% |
| FT | `MultiDict` | `setitem_insert` | 560.4 | 558.4 | -0.36% |
| FT | `MultiDict` | `getall` | 840.6 | 837.6 | -0.36% |
| FT | `MultiDict` | `reinit_items_small` | 6551.1 | 6528.1 | -0.35% |
| FT | `MultiDi... (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 - 37199292436.1 04 Oct 2026 11:37AM UTC 98
86.01
GitHub Action Run
Source Files on build 37199292436
  • 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 #37199292436
  • f2d1da7b on github
  • Prev Build on master (#37198908438)
  • Next Build on master (#37203143829)
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