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

aio-libs / multidict / 35971910018
86%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2026 07:52AM UTC
Jobs 1
Files 43
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

24 Sep 2026 07:51AM UTC coverage: 87.533%. Remained the same
35971910018

push

github

web-flow
Pass the entry identity to the ForEach visitor (#1552)

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

## What do these changes do?

The `ForEach` visitor received the key and the value but not the
identity,
the canonical key a multidict actually looks entries up by. On a
`CIMultiDict` that is the internal lower-cased form, so a visitor
wanting
to group or compare entries by it had to derive it again itself,
duplicating work the walk had already done.

`MultiDict_ItemVisitor` now takes
`(void *user_data, PyObject *identity, PyObject *key, PyObject *value)`.
`user_data` stays first so existing call sites keep their shape, and the
identity goes next to the key and value it belongs with rather than at
the
end. `MultiDict_CyItemVisitor` gains it in the same position, keeping
its
own `user_data`-last order. The internal `md_item_visitor_t` in
`_multilib/walk.h` is widened to match, along with `md_walk_all`,
`md_walk_with_hash` and their two in-tree visitors.

The two walks source it differently. `md_walk_with_hash` passes the
identity it was already handed, which every matched entry compares equal
to by the walk's own predicate, so the keyed path does no extra work.
`md_walk_all` reads `entry->identity` and holds a reference across the
visitor call, the same way it already does for the value, since
`_md_ensure_key()` and the visitor can both run Python code that frees
the entry.

The capsule is unreleased: it landed in #1480, after v6.9.1, and
`MultiDict_CAPI_VERSION` is still 1, so no client can have been built
against the narrower signature. That is why the typedef changes in place
instead of growing a parallel entry point at the end of the struct with
a
version bump.

## Are there changes in behavior for the user?

No, for Python-level users. A C or Cython client of the capsule has to
take the extra parameter, but the capsule has not shipped in a release
yet, so there is nothing to migrate.

## Is it a substantial burden for the maintainers to support this?... (continued)

767 of 1534 branches covered (50.0%)

Branch coverage included in aggregate %.

26 of 37 new or added lines in 1 file covered. (70.27%)

7434 of 7835 relevant lines covered (94.88%)

1.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
76.12
0.72% tests/test_capi.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35971910018.1 24 Sep 2026 07:52AM UTC 86
87.53
GitHub Action Run
Source Files on build 35971910018
  • Tree
  • List 43
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35971910018
  • cd92a6cf on github
  • Prev Build on master (#35971554192)
  • Next Build on master (#35975771385)
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