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

aio-libs / multidict / 38229223837
86%

Build:
DEFAULT BRANCH: master
Ran 12 Oct 2026 09:21AM UTC
Jobs 1
Files 50
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

12 Oct 2026 09:20AM UTC coverage: 86.043% (-0.01%) from 86.054%
38229223837

push

github

web-flow
Read getall() lock-free for a table without repeated keys (#1776)

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

## What do these changes do?

On the free-threaded build, `getall()` of a multidict whose table has
never held a repeated key now takes the same lock-free path as `get()`:
at most one entry can match, so it is the same lookup, wrapped in a
one-item list. A race falls back to the critical section, as `get()`
does. A table with repeated keys still walks under the lock.

The `maybe_dups` flag that tells the two cases apart is set in place on
a live table by inserts and by `extend()`, so it is now read and written
through relaxed atomics (`htkeys_maybe_dups()`,
`htkeys_set_maybe_dups()`). A stale read is harmless: it only makes
`getall()` return the first match, as if it ran before the insert that
added the second one. The lock-free lookup is factored out of `get()` as
`_md_lockfree_get()` so both use it.

The GIL build and the pure-Python implementation are unaffected.

## Are there changes in behavior for the user?

No; `getall()` is faster on the free-threaded build.

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

No. It reuses `get()`'s lock-free lookup and reader protocol.

## 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 (N/A, no documented behavior
changed)
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` (N/A, this repo has no `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`

Drafted with Claude Opus 5.5 (Claude Code); to be reviewed by @asvetlov
before it leaves draft.

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

Tests, after rebasing on 3977c660:
- 3.14.7t (free-threaded): 4243 passed, 197 skipped
- 3.14.7 (GIL): 4... (continued)

832 of 1664 branches covered (50.0%)

Branch coverage included in aggregate %.

21 of 26 new or added lines in 2 files covered. (80.77%)

2 existing lines in 1 file now uncovered.

9778 of 10667 relevant lines covered (91.67%)

1.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
41.61
-0.59% tests/test_table_kinds.py
1
93.7
0.02% tests/test_multidict.py

Coverage Regressions

Lines Coverage ∆ File
2
41.61
-0.59% tests/test_table_kinds.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 38229223837.1 12 Oct 2026 09:21AM UTC 100
86.04
GitHub Action Run
Source Files on build 38229223837
  • Tree
  • List 50
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #38229223837
  • f4a586b1 on github
  • Prev Build on master (#38225593874)
  • Next Build on master (#38229350857)
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