Your patch looks good, thanks for fixing this and thanks for the test. I made a few minor style comments in irc which you've fixed.
(I suggested moving the import of removeSecurityProxy to the module globals, but Salgado provided a good rationale for why we shouldn't do that)
s/_context_view/_naked_context_view
split the return into multiple lines, such as:
has_major_heading = IMajorHeading.providedBy(self._naked_context_view) return len(self.items) > 1 and not has_major_heading
Your patch looks good, thanks for fixing this and thanks for the test. I made a few minor style comments in irc which you've fixed.
(I suggested moving the import of removeSecurityProxy to the module globals, but Salgado provided a good rationale for why we shouldn't do that)
s/_context_ view/_naked_ context_ view
split the return into multiple lines, such as:
has_ major_heading = IMajorHeading. providedBy( self._naked_ context_ view)
return len(self.items) > 1 and not has_major_heading