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

aio-libs / multidict / 36272009708
87%

Build:
DEFAULT BRANCH: master
Ran 26 Sep 2026 09:11PM UTC
Jobs 1
Files 44
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

26 Sep 2026 09:10PM UTC coverage: 87.122% (-0.04%) from 87.16%
36272009708

push

github

web-flow
Return all 64 bits of the version from getversion() (#1607)

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

## What do these changes do?

`getversion()` built its result with `PyLong_FromUnsignedLong()`.
`unsigned long` is 32 bits on every Windows build, 64-bit included, and
on 32-bit platforms, so the `uint64_t` version came back truncated to
its low 32 bits there. It now uses `PyLong_FromUnsignedLongLong()`.

A test-only `_setversion()` hook, next to `_freelist_clear()`, lets the
test set a version above 2**32 without making 2**32 mutations.

## Are there changes in behavior for the user?

Yes, on Windows and 32-bit platforms: `getversion()` returns the full
64-bit version. Before, two different versions that shared their low 32
bits compared equal. That took about 4.3e9 mutations with the current
global counter, but only about 16.7 million new multidicts once #1605
lands, since each multidict then takes a block of 256 versions.
`MultiDict_GetVersion()` in the C API already returned the full
`uint64_t` and is unchanged. The pure-Python implementation is not
affected.

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

No. It is a one-call fix plus a test hook.

## Related issue number

Found while reviewing #1605.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` (N/A, existing contributor)
- [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 (Claude Opus 5.5); reviewed by @asvetlov.

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

On Linux x86-64 `unsigned long` is 64 bits, so the bug does not show
locally; the Windows CI jobs exercise it for real. To check that the
test catches truncation, it was run against a build... (continued)

781 of 1562 branches covered (50.0%)

Branch coverage included in aggregate %.

3 of 8 new or added lines in 1 file covered. (37.5%)

8264 of 8820 relevant lines covered (93.7%)

1.87 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
97.22
-1.96% tests/test_version.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 36272009708.1 26 Sep 2026 09:11PM UTC 88
87.12
GitHub Action Run
Source Files on build 36272009708
  • Tree
  • List 44
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #36272009708
  • 0a4d2e03 on github
  • Prev Build on master (#36270484888)
  • Next Build on master (#36300037037)
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