[Checkins] [zopefoundation/zope.interface] a825e5: Make verification errors more readable and useful.

Jason Madden noreply at github.com
Fri Feb 7 17:59:24 CET 2020


  Branch: refs/heads/issue170
  Home:   https://github.com/zopefoundation/zope.interface
  Commit: a825e5f29e98c8c84076600323ffe791531ac765
      https://github.com/zopefoundation/zope.interface/commit/a825e5f29e98c8c84076600323ffe791531ac765
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M CHANGES.rst
    M docs/verify.rst
    M src/zope/interface/exceptions.py
    M src/zope/interface/interface.py
    M src/zope/interface/tests/test_exceptions.py
    M src/zope/interface/tests/test_interface.py
    M src/zope/interface/verify.py

  Log Message:
  -----------
  Make verification errors more readable and useful.

Eliminate the trailing newlines and blank spaces (the code called them
"a stupid artifact").

Include the name of the defining interface (so the user can easily look up
any requirements on the attribute) and, for methods, the expected
signature (no more guessing about how many arguments are required!).

This is implemented by giving Attribute and Method useful reprs and strs.
Previously, they just had the defaults.

Fixes #170


  Commit: e8a4da9d5e48d036c2280be009f75b6416054a12
      https://github.com/zopefoundation/zope.interface/commit/e8a4da9d5e48d036c2280be009f75b6416054a12
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M docs/verify.rst
    M src/zope/interface/verify.py

  Log Message:
  -----------
  Also document the not-a-method case.


Compare: https://github.com/zopefoundation/zope.interface/compare/e231f4e34af0...e8a4da9d5e48


More information about the checkins mailing list