[Checkins] [zopefoundation/zope.interface] 4c4e1c: Ensure Interface is the last item in the __sro__.

Jason Madden noreply at github.com
Wed Mar 18 18:07:35 CET 2020


  Branch: refs/heads/issue8
  Home:   https://github.com/zopefoundation/zope.interface
  Commit: 4c4e1c985ffa710482cfeebaf1cb28b470bab47e
      https://github.com/zopefoundation/zope.interface/commit/4c4e1c985ffa710482cfeebaf1cb28b470bab47e
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

  Changed paths:
    M CHANGES.rst
    M docs/README.rst
    M src/zope/interface/common/tests/__init__.py
    M src/zope/interface/interface.py
    M src/zope/interface/tests/test_interface.py

  Log Message:
  -----------
  Ensure Interface is the last item in the __sro__.

None of the elegant solutions mentioned in the issue worked out, so I had to brute force it.

Fixes #8


  Commit: 9e399071f0d033e36dd92cf2cc35d7c09505f9af
      https://github.com/zopefoundation/zope.interface/commit/9e399071f0d033e36dd92cf2cc35d7c09505f9af
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

  Changed paths:
    M src/zope/interface/interface.py
    M src/zope/interface/ro.py
    M src/zope/interface/tests/test_ro.py

  Log Message:
  -----------
  Move the one-base optimization down a level, and enable using pre-calculated __sro__ for caching.

In my local 'load the world' test, this went from ~7800 full C3 merges to about ~1100.

Also take steps to avoid triggering false positive warnings about changed ROs when it's *just* Interface that moved.


Compare: https://github.com/zopefoundation/zope.interface/compare/7e532de0bc94...9e399071f0d0


More information about the checkins mailing list