rql #1190458 hash vs comparison for VariableRef [resolved]

rql implements __cmp__ on VariableRef, but does not implement __hash__, which it inherits from object. This means:

  • it breaks on python3 which doesn't use __cmp__ and doesn't inherit __hash__ when __eq__ is implemented
  • in a few places, we rely on the fact that x == y does not imply hash(x) == hash(y): we can put x and y in a dictionary or set as separate objects, and then look for either in a list or tuple and find the other.

This needs to stop.

done in0.34.0
load left0.000
closed by#d475a40f349d [nodes] Drop VariableRef.__cmp__ implementation (closes #1190458)
patch[nodes] Drop VariableRef.__cmp__ implementation (closes #1190458) [applied]