py34 calling __eq__ for !=
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.versionedobjects |
Fix Released
|
High
|
Thang Pham |
Bug Description
There seems to be a problem in python 3.4 with the mix-in class ComparableVersi
harlowja found that in python 3.4, if an object is None or "a string" or something other than an oslo_versionedo
This was found in a patch http://
Take for example,
class Thingee(object):
def __eq__(self, obj):
print 'thingee eq called with %s' % obj
return False
a = Thingee()
print a == None
print a != None
In python 2.7, the results are:
thingee eq called with None
False
True
In python 3.4, the results are:
thingee eq called with None
False
thingee eq called with None
True
In python 3.4, != calls __eq__.
description: | updated |
Changed in oslo.versionedobjects: | |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Davanum Srinivas (DIMS) (dims-v) |
Changed in oslo.versionedobjects: | |
assignee: | Davanum Srinivas (DIMS) (dims-v) → nobody |
Changed in oslo.versionedobjects: | |
status: | Confirmed → In Progress |
Patch available - https:/ /review. openstack. org/206679