Skip to content

test_collections_hashable fails on windows python 3.4 #5647

Closed

Description

@juliantaylor

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?

Activity

  1. cournape commented on Mar 11, 2015

    @cournape
    Member

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

  2. jaimefrio commented on Mar 11, 2015

    @jaimefrio
    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.

  3. cgohlke commented on Aug 2, 2015

    @cgohlke
    Contributor

    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:

  4. added this to the milestone on Aug 27, 2015
  5. charris commented on Aug 27, 2015

    @charris
    Member

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

  6. modified the milestones: , on Oct 13, 2015
  7. charris commented on Jan 12, 2016

    @charris
    Member

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

  8. modified the milestones: 1.12.0 release, on Jan 21, 2016
  9. modified the milestone: 1.12.0 release on Feb 15, 2017
  10. mattip commented on Jan 21, 2019

    @mattip
    Member

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions