Skip to content

gh-143672: Finish conversion of the struct module to Argument Clinic - #143857

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:struct-clinic
Jan 16, 2026
Merged

gh-143672: Finish conversion of the struct module to Argument Clinic#143857
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:struct-clinic

Conversation

@serhiy-storchaka

@serhiy-storchakaserhiy-storchaka commented Jan 15, 2026

Copy link
Copy Markdown
Member

@serhiy-storchakaserhiy-storchaka changed the title gh-143856: Finish conversion of the struct module to Argument Clinicgh-143672: Finish conversion of the struct module to Argument ClinicJan 15, 2026
Comment threadModules/_struct.c
Comment threadModules/_struct.c
Comment threadModules/_struct.c Outdated
Comment threadModules/_struct.c
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated docstrings. Please look if I missed something.

Comment threadModules/_struct.c
Comment threadModules/_struct.c
Struct.pack_into

buffer: Py_buffer(accept={rwbuffer})
offset as offset_obj: object

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should deprecate IndexError. OverflowError will be more meaningful here for, well, an overflow condition.

@serhiy-storchaka
serhiy-storchaka merged commit 780e969 into python:mainJan 16, 2026
45 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the struct-clinic branch January 16, 2026 11:35
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…linic (pythonGH-143857)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for freeto 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.

2 participants

@serhiy-storchaka@skirpichev