BUG: add missing numpy/__init__.pxd to the wheel#16162
Conversation
|
cc @scoder |
|
Don't we have any tests for |
Probably difficult to test the integration here because Cython would always find a |
|
The problem is not with the USE_SDIST job, since the pxd was shipped in the |
|
This could be a backport candidate to 1.18? In the spirit of maximising compatible versions / minimising pitfalls once cython 3.0 is out? |
Cython still ships its own NumPy If NumPy 1.18/9 starts providing its own version, then Cython should prefer that, and the one in Cython will only be used e.g. if NumPy is not installed or too old. But that case might not be obvious to users, so we should make sure that both are aligned for the time being. AFAICT, both are the same in the Cython 0.29 series, and the only difference in Cython 3.0 is that the struct fields So, depending on which version is used, the generated code will end up with either struct field access or API calls. Sadly, the version that is now in NumPy uses the (deprecated) direct field access, and switching to the version in Cython 3.0 requires … Cython 3.0, on user side. To me, this suggests (I think) that it might actually be better for NumPy to not ship the |
Maybe it would make more sense to test the wheels wherever they are produced? |
That's not what I meant. The problem shows up in both Ideally what you want to test is not only that the file gets installed, but also that it's not broken. |
|
FYI, I think (see cython/cython#3573) we will start allowing a versioned naming scheme for |
|
@scoder |
We do test cython in the random api cython tests. We could add a marker like in the recent addition to the pxd and make sure the C file includes it, to verify our version of the pxd is used. This |
|
@scoder I would like to ship the identical version in 1.19 just to be absolutely sure that there is no problem with it. I was hoping that would have happened already for 1.18, but the bug fixed here prevented that. |
that sounds like a good idea |
Which version? The one that is currently in NumPy? Or did you mean to make sure both Cython (0.29) and NumPy come with the same version? I added a couple of |
Yes: the one mentioned in NumPy 1.18 is meant to be functionally the same as the one in Cython 0.29. This PR contains a test to make sure NumPy is using its version, which is heavily used in As for |
|
Let's give this a shot. Thanks Matti. |
|
Hmm, looks like another fixup is needed. See #12284 (comment) . |
It turns out gh-12284 did not actually bundle the
__init__.pxdinto the wheels. It does appears in the sdist (due to theMANIFEST.in).