ABI/type-system break
NumPy 2.0 migration guide PyArray_Descr PyDataType_ELSIZE numpy.org
A source build fails in C/Cython code that directly accesses changed descriptor fields.
Agent Quick Fix
Repair against the current NumPy contract, then keep the change narrow and source-backed.
Product: NumPy
Current-contract area: NumPy 2 C API struct access no longer valid
Likely root cause: A source build fails in C/Cython code that directly accesses changed descriptor fields.
Repair direction: Verifier checks rebuilt/compatible dependencies or explicitly adapted promotion/API behavior. Accept a compatible rebuild/pin only when it preserves the requested NumPy major and behavior constraints.
Symptom
A source build fails in C/Cython code that directly accesses changed descriptor fields.
Why This Happens
Pure Python source may be unchanged while binary wheels, C extensions, or scalar promotion behavior depend on the current runtime ABI and external build artifacts.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
site:numpy.org NumPy 2.0 migration guide PyArray_Descr elsize PyDataType_ELSIZE
NumPy 2.0 migration guide PyArray_Descr PyDataType_ELSIZE numpy.org
https://numpy.org/doc/stable/numpy_2_0_migration_guide.html