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

aio-libs / multidict / 35794352039
87%

Build:
DEFAULT BRANCH: master
Ran 22 Sep 2026 10:49PM 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 10:49PM UTC coverage: 87.876%. Remained the same
35794352039

push

github

web-flow
Drop the unused get_mod_state_by_cls() helper (#1520)

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

## What do these changes do?

`get_mod_state_by_cls()` in `multidict/_multilib/state.h` has no call
sites anywhere in the tree, so it is removed. Module state is reached
through `get_mod_state()`, `get_mod_state_by_def()` and
`get_mod_state_by_def_checked()` everywhere in the extension. Dropping
the helper also leaves `PyType_GetModuleState()` with no remaining
user; no include becomes unnecessary, since `state.h` gets that
declaration from `Python.h`.

C extension only; the pure-Python backend has no equivalent and needs
no matching change.

## Are there changes in behavior for the user?

No. The helper was never reachable from Python.

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

No, it removes code.

## Related issue number

None. Split out of #1518 so that pull request stays one logical change.

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist — N/A, removal of dead code with
no behaviour to test
- [ ] Documentation reflects the changes — N/A, the helper was internal
and undocumented
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` — N/A, no such file in this repo
- [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 Code (Opus 5); reviewed by @asvetlov.

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

Verification that the helper is unreferenced:

```
$ grep -rn "get_mod_state_by_cls" .
CHANGES/1520.misc.rst:1:Removed ``get_mod_state_by_cls()``, an unused helper in the C extension
```

(only the news fragment, after the deletion). `grep -rn
"PyType_GetModuleState"` over `*.c`/`*.h` excluding the vendored
`pythoncapi_compat.h` returns nothing afterwards.

Both backends, run after rebasing onto `1cdd934` ... (continued)

765 of 1530 branches covered (50.0%)

Branch coverage included in aggregate %.

6860 of 7147 relevant lines covered (95.98%)

1.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35794352039.1 22 Sep 2026 10:49PM UTC 80
87.87
GitHub Action Run
Source Files on build 35794352039
  • 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 #35794352039
  • 47f8f9c9 on github
  • Prev Build on master (#35794162320)
  • Next Build on master (#35794808166)
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