Skip to content

Remove HAVE_PROTOTYPES and STDC_HEADERS checks - #10324

Merged
radarhere merged 4 commits into
python-pillow:mainfrom
lazerg:fix/issue-10323-have-prototypes
Oct 27, 2026
Merged

radarhere merged 4 commits into
python-pillow:mainfrom
lazerg:fix/issue-10323-have-prototypes

Conversation

@lazerg

@lazerg lazerg commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10323

CPython main no longer defines HAVE_PROTOTYPES (python/cpython#159513), so the #error in ImPlatform.h stops the build. Pillow requires Python 3.11+, and CPython 3.11+ requires C11, so prototypes and the standard headers are always available. This removes both checks and adds a release note for the C11 minimum.

@lazerg

lazerg commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

The Benchmark job fails on main too (CodSpeed reports "Unsupported system"), and debian-13 failed because it could not reach pypi.org, so neither failure comes from this change.

Comment thread src/libImaging/ImPlatform.h Outdated
Comment thread src/libImaging/ImPlatform.h Outdated
@hugovk hugovk added the Cleanup label Oct 26, 2026
@lazerg lazerg changed the title Remove HAVE_PROTOTYPES check Remove HAVE_PROTOTYPES and STDC_HEADERS checks Oct 26, 2026
@hugovk

hugovk commented Oct 26, 2026

Copy link
Copy Markdown
Member

Let's also add to release notes, similar to https://pillow.readthedocs.io/en/stable/releasenotes/11.1.0.html#minimum-c-version

Minimum C version
^^^^^^^^^^^^^^^^^

C11 is now the minimum version of C required to compile Pillow from source.
Pillow requires Python 3.11 or later, and CPython 3.11 and later require C11.

@lazerg

lazerg commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Added the release note in 1ee3b6c.

@radarhere

Copy link
Copy Markdown
Member

Do we still need this?

#undef HAVE_PROTOTYPES

lazerg#8

@aclark4life

Copy link
Copy Markdown
Member

Do we still need this?

Probably yes for Python 3.11-3.14

@radarhere
radarhere merged commit e31af4a into python-pillow:main Oct 27, 2026
35 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cp316 drops required macro for Pillow to compile

4 participants