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

aio-libs / multidict / 37778453129
86%

Build:
DEFAULT BRANCH: master
Ran 08 Oct 2026 12:41PM 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

08 Oct 2026 12:39PM UTC coverage: 85.978%. Remained the same
37778453129

push

github

web-flow
Mark the proxy constructor error paths and rarely run functions COLD (#1751)

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

## What do these changes do?

Moves the proxy constructors' `TypeError` raises into two `COLD`
helpers. `_err_proxy_target()` covers the wrong-type case in
`_multidict_proxy_set_target()`. `_err_proxy_init_args()` covers the
missing-argument and keyword-argument cases in
`_multidict_proxy_init()`, which now share a single check. Also marks
`multidict_reduce()` (pickling), `module_free()` and the test-only
`_freelist_clear()` `COLD`.

Three more candidates were measured and left out, each because it
shifted GCC's inlining somewhere unrelated. `COLD` on `module_exec()` or
`module_clear()` pushed a `Py_DECREF()` in `_md_drain_retired_slow()`
out of line on FT, costing about 4 Ir per released entry (CIMultiDict
`clear` +9.8%, `copy` +2.8%). `COLD` on the test-only `_setversion()`
shrank GIL `md_get_one()` and made CIMultiDict `get_miss` 1.9% slower.

With those left out, callgrind moves only two rows by 0.5% or more, both
on GIL: MultiDict `getitem_istr` 767.0 -> 762.0 Ir (-0.65%) and
`setitem_istr` 896.0 -> 891.1 Ir (-0.55%). No FT row moves. `.text`
shrinks by 255 B on GIL and 120 B on FT: proxy `tp_vectorcall` loses
146/114 B, each proxy `tp_init` about 105 B, and `multidict_reduce()`
174 B on GIL.

## Are there changes in behavior for the user?

No. The error messages are unchanged, and the missing-argument check
still runs before the keyword-argument check.

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

No.

## Related issue number

Follow-up to #1749.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist (existing `tests/test_types.py`
cases cover both error helpers)
- [x] Documentation reflects the changes (N/A)
- [ ] 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... (continued)

830 of 1660 branches covered (50.0%)

Branch coverage included in aggregate %.

9655 of 10535 relevant lines covered (91.65%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 37778453129.1 08 Oct 2026 12:41PM UTC 100
85.98
GitHub Action Run
Source Files on build 37778453129
  • Tree
  • List 50
  • 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 #37778453129
  • d970d8cd on github
  • Prev Build on master (#37775699769)
  • Next Build on master (#37781823661)
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