Skip to content

Stop reliance on hashable args#97

Merged
Stephen Moseley (MoseleyS) merged 3 commits intomainfrom
cpelley-patch-1
Oct 21, 2025
Merged

Stop reliance on hashable args#97
Stephen Moseley (MoseleyS) merged 3 commits intomainfrom
cpelley-patch-1

Conversation

@cpelley
Copy link
Copy Markdown
Collaborator

@cpelley Carwyn Pelley (cpelley) commented Oct 16, 2025

A set is used to perform argument checking logic. Using a set enforces a requirements that the arguments are hashable (which they may not always be).

The relevant line:

if set(args) == {IGNORE_EVENT}:

We can recreate the exception manually:

>>> set([iris.cube.CubeList([iris.cube.Cube(0), iris.cube.Cube(1)])])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'CubeList'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch fixes the issue we've recently uncovered with handling unhashable CubeList objects

@cpelley
Copy link
Copy Markdown
Collaborator Author

It's now out of draft and ready for review Rob Purvis (@mo-robert-purvis), Stephen Moseley (@MoseleyS)

@MoseleyS Stephen Moseley (MoseleyS) merged commit 3b1f188 into main Oct 21, 2025
3 checks passed
@MoseleyS Stephen Moseley (MoseleyS) deleted the cpelley-patch-1 branch October 21, 2025 12:28
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

Successfully merging this pull request may close these issues.

3 participants