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

aio-libs / multidict / 34591249647
87%

Build:
DEFAULT BRANCH: master
Ran 11 Sep 2026 10:52AM UTC
Jobs 1
Files 31
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

11 Sep 2026 10:15AM UTC coverage: 85.251% (-0.03%) from 85.279%
34591249647

push

github

web-flow
Implement tp_vectorcall for MultiDict, CIMultiDict and their proxies (#1436)

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

## What do these changes do?

`MultiDict(...)`, `CIMultiDict(...)`, `MultiDictProxy(...)` and
`CIMultiDictProxy(...)` now go through a dedicated `tp_vectorcall`
function in the C extension instead of the classic `tp_new`/`tp_init`
pair, avoiding the positional-args tuple and keyword-args dict that
`type.__call__()` otherwise builds for every construction call. The new
path reuses the same `md_init()`/`md_update_from_*()` primitives as the
existing constructors, so behaviour is unchanged.

Since the object under construction is freshly allocated and not yet
reachable from any other thread, only an existing multidict, proxy, or
plain dict argument needs a critical section during construction, not
`self`.

The pure-Python implementation is unaffected: there is no equivalent
C-level calling protocol to opt into there, so no change was needed on
that side.

## Are there changes in behavior for the user?

No. Construction is faster in the common case; results, error messages,
and subclassing behaviour (a `__new__`/`__init__` override in a Python
subclass still runs, since the fast path is not inherited by subclasses)
are unchanged.

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

No. The new code is a self-contained addition that shares its core logic
with the existing constructors rather than duplicating it, and does not
change any existing code paths.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
- [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`

<details>
<summary>Agent run details (optional, for reviewers)</sum... (continued)

638 of 1276 branches covered (50.0%)

Branch coverage included in aggregate %.

35 of 43 new or added lines in 2 files covered. (81.4%)

1 existing line in 1 file now uncovered.

4356 of 4582 relevant lines covered (95.07%)

1.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
46.46
4.16% tests/test_types.py

Coverage Regressions

Lines Coverage ∆ File
1
46.46
4.16% tests/test_types.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 34591249647.1 11 Sep 2026 10:52AM UTC 62
85.26
GitHub Action Run
Source Files on build 34591249647
  • Tree
  • List 31
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34591249647
  • 286a6f8a on github
  • Prev Build on master (#34481271608)
  • Next Build on master (#34609305018)
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