[Checkins] [zopefoundation/ExtensionClass] 762af9: fix calling `__class_init__` hook by the Python im...

GitHub noreply at github.com
Sat Apr 4 02:04:07 CEST 2015


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/ExtensionClass
  Commit: 762af92148cffa8f7de86574d638f6c7494bbd22
      https://github.com/zopefoundation/ExtensionClass/commit/762af92148cffa8f7de86574d638f6c7494bbd22
  Author: David Glick <david at glicksoftware.com>
  Date:   2015-03-31 (Tue, 31 Mar 2015)

  Changed paths:
    M CHANGES.rst
    M src/ExtensionClass/__init__.py
    M src/ExtensionClass/tests.py

  Log Message:
  -----------
  fix calling `__class_init__` hook by the Python implementation

Always call `__class_init__` as an unbound function, like the C implementation does,
so it works even when `__class_init__` is patched in after class creation like
Zope does to `Persistent`.

The extra check for `__func__` is because getting a function attribute in Python 3
does not turn it into a method.


  Commit: 4963a7d442fa5d3172138e025d4371ce79804200
      https://github.com/zopefoundation/ExtensionClass/commit/4963a7d442fa5d3172138e025d4371ce79804200
  Author: Tres Seaver <tseaver at palladion.com>
  Date:   2015-04-03 (Fri, 03 Apr 2015)

  Changed paths:
    M CHANGES.rst
    M src/ExtensionClass/__init__.py
    M src/ExtensionClass/tests.py

  Log Message:
  -----------
  Merge branch 'fix-__class_init__'


Compare: https://github.com/zopefoundation/ExtensionClass/compare/b096a3a6afde...4963a7d442fa


More information about the checkins mailing list