Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
Bug report
Bug description:
New Python versions give aDeprecationWarning
for struct definitions that use_pack_ = True
but do not specify the_layout_
.
In a sense a new feature, but as I believe this is only relevant for bit-fields: wouldn't it make sense to allow leaving_layout_
unspecified when the struct contains no bitfields?
(I suppose that means giving it some default, such as the system native layout.)
The context is just seeing this in NumPy where bit-fields are not used so I was wondering:numpy/numpy#28926.
Adding the_layout_
isn't a problem of course, but if the no-bitfield case is common (not sure) it may be nice to not be forced to "decide" on an irrelevant_layout_
(or act up on theDeprecationWarning
)?
Another question that comes to mind is that_layout_ = "native"
or so seems potentially useful.
CPython versions tested on:
3.14
Operating systems tested on:
Other