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

aio-libs / multidict / 34026452283
87%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2026 10:06AM 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

06 Sep 2026 10:05AM UTC coverage: 85.241% (+0.04%) from 85.198%
34026452283

push

github

web-flow
Fix reference/resource leaks on three C-extension error paths (#1381)

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

## What do these changes do?

Three leaks on error paths in the C extension:

1. `items`-view `__contains__` (`_multilib/views.h`) fetched and owned
element 0 of a candidate pair,
   then returned on an element-1 failure without releasing element 0.
2. `md_repr` (`_multilib/hashtable.h`) did a bare `return NULL` on the
"changed during iteration" guard,
   leaking its `PyUnicodeWriter`; it now `goto fail` to discard it.
3. `md_next` (`_multilib/hashtable.h`) leaked the identity reference
when key materialisation failed
   under low memory.

C-extension-only concerns (the pure-Python backend relies on the GC); no
pure-Python change is needed.

## Are there changes in behavior for the user?

No user-visible behavior change; these are leak fixes on error paths.

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

No. Small, localized changes.

## Related issue number

Findings from the C-extension analysis report #1306.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist (deterministic refcount test for
(1), functional test for (2))
- [x] Documentation reflects the changes (no public API change)
- [ ] N/A — no `CONTRIBUTORS.txt` in this repo
- [x] Add a new news fragment into the `CHANGES/` folder

---------

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

627 of 1254 branches covered (50.0%)

Branch coverage included in aggregate %.

28 of 30 new or added lines in 1 file covered. (93.33%)

4161 of 4363 relevant lines covered (95.37%)

1.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
91.19
0.07% tests/test_multidict.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 34026452283.1 06 Sep 2026 10:06AM UTC 62
85.25
GitHub Action Run
Source Files on build 34026452283
  • Tree
  • List 31
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34026452283
  • e4cd5f62 on github
  • Prev Build on master (#34024160706)
  • Next Build on master (#34026791742)
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