Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28629 closed Bug (fixed)

Q objects are no longer hashable in 2.0.

Reported by: coady Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 2.0
Severity: Release blocker Keywords: Q hash
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

tree.node acquired an __eq__ method, but not __hash__, making it an unhashable type. This affects subclasses such as Q.

My use case was having a mapping of Q objects to values.

Change History (5)

comment:1 by Claude Paroz, 7 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by Mariusz Felisiak, 7 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:3 by Mariusz Felisiak, 7 years ago

Has patch: set

comment:4 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In fc6528b:

Fixed #28629 -- Made tree.Node instances hashable.

Regression in 508b5debfb16843a8443ebac82c1fb91f15da687 which
added Node.eq().

comment:5 by Tim Graham <timograham@…>, 7 years ago

In 8368d5a4:

[2.0.x] Fixed #28629 -- Made tree.Node instances hashable.

Regression in 508b5debfb16843a8443ebac82c1fb91f15da687 which
added Node.eq().

Backport of fc6528b25ab1834be1a478b405bf8f7ec5cf860c from master

Note: See TracTickets for help on using tickets.
Back to Top