This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support buffer protocol for _struct.Struct format argument
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: corona10, serhiy.storchaka, youknowone
Priority: normal Keywords:

Created on 2021-10-07 17:49 by youknowone, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28805 merged youknowone, 2021-10-07 17:49
Messages (3)
msg403426 - (view) Author: youknowone (youknowone) * Date: 2021-10-07 17:49
This feature is commented as `XXX` for years.

https://github.com/python/cpython/blob/4e605666b08b8f863cbbbdaa34bb06988e648d26/Modules/_struct.c#L1478

Giving a bug tracker id or removing the comment will clarify the problem.
msg403437 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-10-07 19:22
I prefer to remove the comment. The format string is a text by its nature, there is no reason to support arbitrary binary data. Bytes objects are only supported for compatibility (with Python 2 strings).
msg403458 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-10-08 06:45
New changeset 9f7a94fd66e05ae040a67e32c397091fe5939ced by Jeong YunWon in branch 'main':
bpo-45407: Remove outdated XXX comment from Struct___init___impl (GH-28805)
https://github.com/python/cpython/commit/9f7a94fd66e05ae040a67e32c397091fe5939ced
History
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89570
2021-10-08 06:46:16corona10setstatus: open -> closed
resolution: rejected
stage: resolved
2021-10-08 06:45:18corona10setmessages: + msg403458
2021-10-08 01:17:29corona10setnosy: + corona10
2021-10-07 19:22:30serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg403437
2021-10-07 17:49:27youknowonecreate