Skip to content

BUG: fix type issues in uses if PyDataType macros#30957

Merged
charris merged 2 commits intonumpy:maintenance/2.4.xfrom
charris:backport-30918
Mar 7, 2026
Merged

BUG: fix type issues in uses if PyDataType macros#30957
charris merged 2 commits intonumpy:maintenance/2.4.xfrom
charris:backport-30918

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Mar 7, 2026

Backport of #30918.

@kumaraditya303 and I ran into these working on support for the opaque PyObject build.

These PyDataType macros expect a PyArray_Descr * argument, but in all three cases happen to work because the macros use direct struct field accesses and all these structs share field names.

@charris charris added this to the 2.4.3 release milestone Mar 7, 2026
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 7, 2026
@charris charris merged commit 9ee571d into numpy:maintenance/2.4.x Mar 7, 2026
73 checks passed
@pllim

This comment was marked as outdated.

@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 16, 2026

Thanks @plim for the heads up. I can't actually see what versions of numpy and cython are getting installed, cibuildwheel is swallowing the stdout in those jobs. For others: the failure is in the cython __Pyx_Get_FusedFunction_Type, It is calling Py_INCREF(tp), and the error is note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyTypeObject *’ {aka ‘struct _typeobject *’}. This looks like a Cython problem? Maybe fallout from cython/cython#7556, see my comment

@pllim
Copy link
Copy Markdown
Contributor

pllim commented Mar 16, 2026

Sorry for the noise, I think it was on our end after all (https://github.com/astropy/astropy/pull/19429/changes).

@pllim
Copy link
Copy Markdown
Contributor

pllim commented Mar 16, 2026

Oh actually, I see cython/cython#7576 now. Well, I am glad upstream is fixing it anyway.

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

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants