Skip to content

HAVE_PROTOTYPES macro should be restored #160829

Open

Description

@smontanaro

Bug report

The HAVE_PROTOTYPES macro disappeared recently (commit e4f7327c). While it's not used in Python proper, it seems to be used by some third-party packages. Removing it seems short-sighted. Without it, the pillow package fails to build, because it requires ANSI prototypes and no longer thinks Python provides them.

CPython versions tested on:

3.16

Operating systems tested on:

macOS

Activity

  1. smontanaro commented on Oct 28, 2026

    @smontanaro
    ContributorAuthor
  2. hugovk commented on Oct 28, 2026

    @hugovk
    Member

    Don't worry about Pillow, we've (this week!) already removed HAVE_PROTOTYPES and STDC_HEADERS, they were added 30 years ago and are no longer needed.

    If it shows up in other libraries, let's see if they can also remove them. The alpha period is the right time for this, and we can always restore later on if it's really necessary.

  3. smontanaro commented on Oct 28, 2026

    @smontanaro
    ContributorAuthor

    Thanks @hugovk. So I should be able to just reference the Pillow repo for the time being?

  4. added
    3.16new features, bugs and security fixes
    and removed on Oct 28, 2026
  5. Keith-S-Thompson commented on Oct 28, 2026

    @Keith-S-Thompson

    I don't see a commit e4f7327c. The relevant commit seems to be b26fc41.

  6. hugovk commented on Oct 29, 2026

    @hugovk
    Member

    5. Thanks @hugovk. So I should be able to just reference the Pillow repo for the time being?

    Yes, I think so. Prototypes are C89, long required: https://peps.python.org/pep-0007/#c-standards

    From what I can tell, the oldest Python that no longer needs this macro is 2.0: if a compiler can't handle prototypes, it can't compile Python.h from 2.0 onwards. So if your library (somehow!) supports Python 2.0 up to 3.16, it's fine with these removals.

    Python 1.6 is the last release that needs this macro. So if your library (somehow!!!) supports Python 1.6 up to 3.16, then the macro is needed. I doubt there are any, and we don't need to support them :)

  7. added
    pendingThe issue will be closed if no feedback is provided
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.16new features, bugs and security fixesbuildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions