Skip to content

Add _layout_ for ctypes to resolve warning introduced in Python 3.14#99

Closed
kspaceKelvin wants to merge 1 commit into
ismrmrd:masterfrom
kspaceKelvin:ctype_layout
Closed

Add _layout_ for ctypes to resolve warning introduced in Python 3.14#99
kspaceKelvin wants to merge 1 commit into
ismrmrd:masterfrom
kspaceKelvin:ctype_layout

Conversation

@kspaceKelvin

Copy link
Copy Markdown
Contributor

Python 3.14 introduces a _layout_ property for ctypes. Setting the _pack_ property without _layout_ produces a warning in 3.14 and will result in an error in 3.19. This change does not affect Python <3.14

Warning message without this fix:

>>> import ismrmrd
/opt/code/ismrmrd-python/ismrmrd/image.py:45: DeprecationWarning: Due to '_pack_', the 'ImageHeader' Structure will use memory layout compatible with MSVC (Windows). If this is intended, set _layout_ to 'ms'. The implicit default is deprecated and slated to become an error in Python 3.19.

@kspaceKelvin

Copy link
Copy Markdown
Contributor Author

Duplicate of #97

@kspaceKelvin kspaceKelvin marked this as a duplicate of #97 Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants