astropy / astropy/regions

Upgraded from v0.4 to v0.9 - EllipseSkyRegion no longer hashable?

Open
#555 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
65
Forks
64
Avg merge
2d 13h
Merged PRs (30d)
4

Description

Hi!

First off, thanks for making this module, it has been very useful in my own software. I've been very bad at keeping dependencies updated, and have recently started updating them all. Testing highlighted a problem and throws an error:

TypeError: unhashable type: 'EllipseSkyRegion'

I'm wondering if this was a deliberate behaviour change?

I was essentially using an intersection between two sets to determine which region instances where present in both, which I should be able to achieve in other ways (I believe the region class has an __eq__ method implemented), but using the sets and intersection was neat.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the TypeError when an EllipseSkyRegion is placed in a set, then compare the behavior between versions v0.4 and v0.9. Inspect the region class's __eq__ implementation and related hash behavior. Done means establishing whether the change was intentional and, if not, restoring or documenting compatible set-intersection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.