Skip to content
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

BUG: core: fix NPY_TITLE_KEY macro on pypy #10962

Merged
merged 1 commit into from Apr 23, 2018

Conversation

Projects
None yet
2 participants
@ahaldane
Copy link
Member

commented Apr 23, 2018

Backport of #10860

On Pypy, dictionary keys do not necessarily preserve object identity.

This however was assumed by the NPY_TITLE_KEY macro, which relies on
descriptor.c:568 using the same 'title' object both as a dictionary key
as an entry in the tuple inserted.

Since the items in the field dict are unique, value identity is however
sufficient for the NPY_TITLE_KEY macro. On PyPy, fix the macro by
comparing values instead.

BUG: core: fix NPY_TITLE_KEY macro on pypy
On Pypy, dictionary keys do not necessarily preserve object identity.

This however was assumed by the NPY_TITLE_KEY macro, which relies on
descriptor.c:568 using the same 'title' object both as a dictionary key
as an entry in the tuple inserted.

Since the items in the field dict are unique, value identity is however
sufficient for the NPY_TITLE_KEY macro. On PyPy, fix the macro by
comparing values instead.

@ahaldane ahaldane added this to the 1.14.3 release milestone Apr 23, 2018

@ahaldane ahaldane merged commit cfa022f into numpy:maintenance/1.14.x Apr 23, 2018

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: C/C++ No alert changes
Details
lgtm analysis: JavaScript No alert changes
Details
lgtm analysis: Python No alert changes
Details

@charris charris changed the title (Backport 1.14.3) BUG: core: fix NPY_TITLE_KEY macro on pypy BUG: core: fix NPY_TITLE_KEY macro on pypy Apr 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.