Skip to content

MAINT: Help boost::python libraries at least not crash#20618

Merged
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
charris:backport-20616
Dec 18, 2021
Merged

MAINT: Help boost::python libraries at least not crash#20618
charris merged 1 commit intonumpy:maintenance/1.21.xfrom
charris:backport-20616

Conversation

@charris
Copy link
Member

@charris charris commented Dec 17, 2021

Backport of #20616.

This adds an almost random "sanity check" to PyArray_EquivTypes
for the sole purpose of allowing boost::python compiled libs to
not crash.
boost::python is buggy, it needs to be fixed. This may break them
(I am unsure), because some conversions which used to work may fail
here (if they worked, they only worked because random type data may
have matched up correctly for our scalar types).

We could error, or warn or... but I hope boost::python will just fix
this soon enough and future us can just delete the whole branch.

Replaces gh-20507

This adds an almost random "sanity check" to `PyArray_EquivTypes`
for the sole purpose of allowing boost::python compiled libs to
_not crash_.
boost::python is buggy, it needs to be fixed.  This may break them
(I am unsure), because some conversions which used to work may fail
here (if they worked, they only worked because random type data may
have matched up correctly for our scalar types).

We could error, or warn or... but I hope boost::python will just fix
this soon enough and future us can just delete the whole branch.

Replaces numpygh-20507
@charris charris added this to the 1.21.5 release milestone Dec 17, 2021
@charris charris merged commit e559d9a into numpy:maintenance/1.21.x Dec 18, 2021
@charris charris deleted the backport-20616 branch December 18, 2021 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants