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

aio-libs / multidict / 35789385592
87%

Build:
DEFAULT BRANCH: master
Ran 22 Sep 2026 09:55PM UTC
Jobs 1
Files 40
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

22 Sep 2026 09:54PM UTC coverage: 87.779%. Remained the same
35789385592

push

github

web-flow
Route every shared hash table field through named accessors (#1518)

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

## What do these changes do?

Every field of the hash table that code on **both** builds touches is
now
read and written through a named inline accessor in a new
`_multilib/freethreading.h` header, instead of each call site picking
between an atomic and a plain access behind `#ifdef Py_GIL_DISABLED`.
Under free-threading an accessor forwards to `atomic_helpers.h`,
otherwise it is the plain access the GIL already makes safe.
`atomic_helpers.h` gained GIL-build versions of the primitives it was
missing, which is what makes that possible.

`#ifdef Py_GIL_DISABLED` across the extension drops from 39 to 25, and
in
`hashtable.h` from 31 to 16. `_md_del_at()` is the clearest case: it had
carried the same fifteen lines of bookkeeping twice, once per build.
`htkeys.h`'s `LOAD_INDEX`/`STORE_INDEX` macros become ordinary inline
functions for the same reason.

An accessor earns its place only by unifying the two builds, so code
that
compiles solely under `Py_GIL_DISABLED` keeps naming `atomic_helpers.h`
directly. The lock-free reader protocol is all of that, and it is
byte-for-byte unchanged.

No access changes type: each site keeps the operation and memory order
it
already had, and reads made under `md`'s critical section stay plain.

## Are there changes in behavior for the user?

No. Both builds compile to byte-identical machine code.

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

No; it removes duplication rather than adding any. Adding a new mutation
no longer means remembering which fields are shared and what ordering
each needs.

## Related issue number

None.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist (N/A, no behaviour change; the
existing suite is the test)
- [x] Documentation reflects the changes (N/A, internal C headers only)
- [ ] If you provide code modification, pleas... (continued)

765 of 1530 branches covered (50.0%)

Branch coverage included in aggregate %.

6791 of 7078 relevant lines covered (95.95%)

1.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35789385592.1 22 Sep 2026 09:55PM UTC 80
87.78
GitHub Action Run
Source Files on build 35789385592
  • Tree
  • List 40
  • 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 #35789385592
  • 1cdd934b on github
  • Prev Build on master (#35776927198)
  • Next Build on master (#35794162320)
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