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

aio-libs / multidict / 36536336556
87%

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

29 Sep 2026 07:23AM UTC coverage: 86.928% (-0.2%) from 87.125%
36536336556

push

github

web-flow
Test finalizer reentrancy across every mutating method (#1631)

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

## What do these changes do?

Adds `tests/finalizer_helpers.py`, a key, a value and an argument item
that run a callback from their finalizer behind a `Fuse` that keeps them
quiet during setup and inspection, and
`tests/test_finalizer_reentrancy.py`, which runs every mutating method
of `MultiDict` and `CIMultiDict` (`[]=`, `del`, `add`, `setdefault`,
`pop`, `popone`, `popall`, `popitem`, `clear`, `extend`, `update` from
pairs, a dict and a multidict, `merge`, `__init__` from pairs and a
multidict, `copy`) with finalizers on keys or values, under nine actions
(add, add the same key, set it, update it, remove another key, clear,
re-init, grow past a resize, popitem). It compares result, contents,
`len()` and finalizer count between the C implementation and the
pure-Python one, and asserts whether each call runs a finalizer at all:
`add`, `setdefault` and `copy` never do, and the pop family hands the
removed value back. 612 cases; before the fixes, 177 of the first 544
failed.

The fixes the audit found have all merged: #1625, #1626, #1627, #1628
and #1630, with #1629 and #1635 as follow-ups and #1634 tracking a
remaining corner case.

## Are there changes in behavior for the user?

No, tests only.

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

No. A new mutating method or a new way to drop a reference is one more
entry in `_METHODS` or `_ACTIONS`.

## Related issue number

Follows #1619, which fixed the first bug of this class.

## 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>Audi... (continued)

789 of 1578 branches covered (50.0%)

Branch coverage included in aggregate %.

79 of 116 new or added lines in 2 files covered. (68.1%)

8960 of 9637 relevant lines covered (92.97%)

1.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
37
54.88
tests/test_finalizer_reentrancy.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 36536336556.1 29 Sep 2026 07:24AM UTC 96
86.93
GitHub Action Run
Source Files on build 36536336556
  • Tree
  • List 48
  • 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 #36536336556
  • 7f00b5d4 on github
  • Prev Build on master (#36529007782)
  • Next Build on master (#36537614598)
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