"ZPublisher.HTTPRequest.record.__cmp__" unreliable

Bug #454448 reported by Dieter Maurer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

The method above essentially compares "__dict__.items()". However, the order in which items are generated is not determined by the set of "key --> value" pairs. Therefore, different record instances with the same set of "key --> value" pairs can compare unequal.

I suggest to replace "cmp(self.__dict__.items(), other.__dict__.items())" by "cmp(self.__dict__, other.__dict__)".

Tags: 2.12.0
Changed in zope2:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.