Opened 2 months ago

Closed 8 weeks ago

Last modified 8 weeks ago

#28629 closed Bug (fixed)

Q objects are no longer hashable in 2.0.

Reported by: coady Owned by: felixxm
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 Changed 8 weeks ago by Claude Paroz

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 weeks ago by felixxm

Owner: changed from nobody to felixxm
Status: newassigned

comment:3 Changed 8 weeks ago by felixxm

Has patch: set

comment:4 Changed 8 weeks ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In fc6528b:

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

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

comment:5 Changed 8 weeks ago by Tim Graham <timograham@…>

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