Skip to content

Py_buffer::format is implemented as char* instead of const char* #94916

Description

@maxbachmann

Bug report

The format member in Py_buffer is documented to have the type const char*. However the actual type is char*:

char *format;

Activity

  1. cmaloney commented on Nov 9, 2025

    @cmaloney
    Contributor

    This is fixed for Python 3.12+ by gh-119467; Another contributor came across the same issue and contributed a patch.

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

    docsDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions