Skip to content

MNT: new deprecations from CPython struct module in ctypes tests #28926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ngoldbaum opened this issue May 8, 2025 · 1 comment
Open

MNT: new deprecations from CPython struct module in ctypes tests #28926

ngoldbaum opened this issue May 8, 2025 · 1 comment

Comments

@ngoldbaum
Copy link
Member

Running the tests with CPython 3.14.0b1, I see these failures:

FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_union_with_struct_packed - DeprecationWarning: Due to '_pack_', the 'Struct' Structure will use memory lay...
FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_union_packed - DeprecationWarning: Due to '_pack_', the 'Struct' Structure will use memory lay...
FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_packed_structure - DeprecationWarning: Due to '_pack_', the 'PackedStructure' Structure will use m...
FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_large_packed_structure - DeprecationWarning: Due to '_pack_', the 'PackedStructure' Structure will use m...
FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_big_endian_structure_packed - DeprecationWarning: Due to '_pack_', the 'BigEndStruct' Structure will use memo...
FAILED numpy/_core/tests/test_dtype.py::TestFromCTypes::test_little_endian_structure_packed - DeprecationWarning: Due to '_pack_', the 'LittleEndStruct' Structure will use m...
FAILED numpy/tests/test_ctypeslib.py::TestAsCtypesType::test_structure - DeprecationWarning: Due to '_pack_', the 'struct' Structure will use memory lay...
FAILED numpy/tests/test_ctypeslib.py::TestAsCtypesType::test_structure_aligned - DeprecationWarning: Due to '_pack_', the 'struct' Structure will use memory lay...
FAILED numpy/tests/test_ctypeslib.py::TestAsCtypesType::test_union - DeprecationWarning: Due to '_pack_', the 'union' Union will use memory layout c...
FAILED numpy/tests/test_ctypeslib.py::TestAsCtypesType::test_padded_union - DeprecationWarning: Due to '_pack_', the 'union' Union will use memory layout c...

For now I'm just going to filter these warnings in the tests with a link back to this issue. Someone should investigate this and figure out why we're triggering deprecation warnings and whether we want to adjust things or give upstream some feedback.

@seberg
Copy link
Member

seberg commented May 9, 2025

Checking this it sounds like this is related to bit-fields only.

I am wondering if we should pester CPython to only deprecate it when the struct actually contains bit-types (which it never will for us)? On first sight, it feels a bit unnecessary to force us to specify something irrelevant.

EDIT: Opened an issue, let's see what CPython thinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy