[Checkins] [zopefoundation/zope.interface] 32e25b: Fix CPython3.5 crashes.

Jason Madden noreply at github.com
Sun Mar 8 17:26:47 CET 2020


  Branch: refs/heads/issue11
  Home:   https://github.com/zopefoundation/zope.interface
  Commit: 32e25b30cbe7c079e435d58a4167fbc8db86d150
      https://github.com/zopefoundation/zope.interface/commit/32e25b30cbe7c079e435d58a4167fbc8db86d150
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-03-08 (Sun, 08 Mar 2020)

  Changed paths:
    M src/zope/interface/adapter.py

  Log Message:
  -----------
  Fix CPython3.5 crashes.

Apparently there's a bug in tuple(map(func, it)) when func can return transient objects.

The `_lookup` function was overwriting the `cache` stack variable with garbage when `tuplefy` was called with such a map object. The fix is to stop using map in favor of list comprehensions.

This has the bonus of being faster.




More information about the checkins mailing list