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

aio-libs / multidict / 36435697115
87%

Build:
DEFAULT BRANCH: master
Ran 28 Sep 2026 02:25PM UTC
Jobs 1
Files 45
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

28 Sep 2026 02:24PM UTC coverage: 86.989% (-0.004%) from 86.993%
36435697115

push

github

web-flow
Set the pure-Python size before releasing the old pairs on re-init (#1626)

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

## What do these changes do?

The pure-Python `__init__()` with a multidict of the same kind replaced
`_keys` and only then set `_used` from the source, overwriting the count
of whatever a finalizer of an old value added in between: the pair
stayed but `len()` was off. It now sets the size before swapping the
table, the order #1619 gave the C implementation. The generic path also
sets `_used = 0` right before its swap rather than before parsing the
argument, so user code the argument runs no longer sees an empty count
over the old table.

The C implementation is unaffected; #1619 already fixed it.

## Are there changes in behavior for the user?

Yes, only on the pure-Python backend: `len()` is right after such a
re-init.

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

No, it reorders two assignments.

## Related issue number

Follows #1619; found by the finalizer audit in #1631.

## 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` (N/A)
- [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)</summary>

The existing `test_reinit_finalizer_sees_and_keeps_new_contents` gains a
`len()` check, which fails on the four pure-Python `same_kind`/`proxy`
cases against master and passes here.

Tests, one venv and tree copy per leg, full suite: GIL 3.14.7 (2899
passed), FT 3.14.7t (2887), 3.10.17 (2899), `MULTIDICT_DEBUG_BUILD=1`
GIL (2899) and FT (2887), pure Python with `MULTIDICT_NO_EXTENSIONS=1
--no-c-extensions` (1358), and ASan+UBSan on a debug GIL build with
`PYTHONMALLOC=malloc` (2887, `test_le... (continued)

785 of 1570 branches covered (50.0%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

8615 of 9236 relevant lines covered (93.28%)

1.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 36435697115.1 28 Sep 2026 02:25PM UTC 90
86.99
GitHub Action Run
Source Files on build 36435697115
  • Tree
  • List 45
  • 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 #36435697115
  • 081c1f41 on github
  • Prev Build on master (#36409791975)
  • Next Build on master (#36439719872)
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