Repository navigation
Commit e812c4f
authored
Fix the C extension build where char is unsigned (#1759)
<!-- Thank you for your contribution! -->
## What do these changes do?
The `v7.1.0` tag run failed to build the armv7l wheel, and the other
QEMU-emulated wheel jobs were cancelled with it, so nothing was
published. On ARM, PowerPC, s390x and RISC-V plain `char` is unsigned,
and initializing `empty_htkeys.indices` with `DKIX_EMPTY` (-1) trips
`-Wsign-conversion`, fatal under `-Werror` since #1611 turned
`-Wconversion` back on. Regular CI never builds those architectures, so
it surfaced only on the tag.
The fix casts the initializer entries to `char` explicitly. Runtime
behaviour was not affected: every read and write of the indices goes
through `int8_t*`, so the stored bytes are the same either way.
The changelog entry goes straight into the unpublished 7.1.0 section, as
RELEASE.md describes for a tag whose run never published anything; the
tag gets moved to the merge commit afterwards.
## Are there changes in behavior for the user?
No; the C extension builds again where `char` is unsigned.
## Is it a substantial burden for the maintainers to support this?
No.
## Related issue number
Failed run:
https://github.com/aio-libs/multidict/actions/runs/37827427484
## Checklist
- [x] I think the code is well written
- [ ] Unit tests for the changes exist N/A, build fix; reproduced and
verified with `-funsigned-char` as described below
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` N/A
- [ ] Add a new news fragment into the `CHANGES/` folder N/A, the entry
is added to the unreleased 7.1.0 section of `CHANGES.rst` directly
- [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>
Reproduced on x86_64 by building master with `CFLAGS=-funsigned-char`:
the eight `DKIX_EMPTY` initializers were the only errors.
With the fix, built with `CFLAGS=-funsigned-char` on CPython 3.10.17,
3.14.7 and 3.14.7t; the full suite passes on all three (4254, 4250 and
4235 passed).
`tools/check_inlining.py` passes on 3.14.7 and 3.14.7t. `make
doc-spelling` and pre-commit pass.
</details>1 parent f9459a1 commit e812c4f
2 files changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| |||
0 commit comments