Skip to content

test_collections_hashable fails on windows python 3.4 #5647

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

Closed
juliantaylor opened this issue Mar 8, 2015 · 6 comments
Closed

test_collections_hashable fails on windows python 3.4 #5647

juliantaylor opened this issue Mar 8, 2015 · 6 comments

Comments

@juliantaylor
Copy link
Contributor

test introduced in gh-5326
isinstance(np.array([]), collections.Hashable) is true on windows python 3.4.3 built with msvc
though what is weird that both hash(x) and x.hash() raise an exception as expected, no clue whats going on.

@cournape any idea?

@cournape
Copy link
Member

Not on the top of my head. The isinstance check is False as expected everywhere else, correct ?

@jaimefrio
Copy link
Member

I also see this in Python 2.7.5 with numpy built from a more or less recent master, using 32 bit MinGW. It is only the isinstance check that fails.

@cgohlke
Copy link
Contributor

cgohlke commented Aug 2, 2015

test_collections_hashable also fails here on python 3.4.3 and 3.5.0b4, win-amd64:

Python's test for "hashability" is at https://hg.python.org/cpython/file/c7273b46980c/Lib/_collections_abc.py#l73.

np.ndarray.__dict__["__hash__"] is <slot wrapper '__hash__' of 'numpy.ndarray' objects>, not None, hence isinstance(x, collections.Hashable) returns True.

hash(np.array([])) correctly raises TypeError.

Relevant Python docs:

@charris charris added this to the 1.10.0 release milestone Aug 27, 2015
@charris
Copy link
Member

charris commented Aug 27, 2015

Marking this as something to take another look at for the 1.10 release.

@charris charris modified the milestones: 1.11.0 release, 1.10.0 release Oct 13, 2015
@charris
Copy link
Member

charris commented Jan 12, 2016

What has happened with this? Anyone. We don't see errors on AppVeyor.

@charris charris modified the milestones: 1.12.0 release, 1.11.0 release Jan 21, 2016
@rgommers rgommers modified the milestone: 1.12.0 release Feb 15, 2017
@mattip
Copy link
Member

mattip commented Jan 21, 2019

Closing, it seems the actual issue is lost in the haze of time. If needed please open a new issue with a reproducer.

@mattip mattip closed this as completed Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants