[Checkins] [zopefoundation/zope.interface] 84872a: Remove the bare except: statements.

Jason Madden noreply at github.com
Mon Apr 6 16:06:50 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zope.interface
  Commit: 84872a8d2ab6b980aebc1c3c1ffb6aee9cf97ea5
      https://github.com/zopefoundation/zope.interface/commit/84872a8d2ab6b980aebc1c3c1ffb6aee9cf97ea5
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M CHANGES.rst
    M src/zope/interface/_zope_interface_coptimizations.c
    M src/zope/interface/declarations.py
    M src/zope/interface/interface.py
    M src/zope/interface/tests/__init__.py
    M src/zope/interface/tests/test_adapter.py
    M src/zope/interface/tests/test_declarations.py
    M src/zope/interface/tests/test_interface.py

  Log Message:
  -----------
  Remove the bare except: statements.

Only catch AttributeError instead of everything.

Fixes #200

Note that this does break a doctest in five.intid (it's expecting a TypeError but it now gets Acquisition's RuntimeError).


  Commit: a4ed0566f9dd9cd65af39576f6c8fdeb252d1ea9
      https://github.com/zopefoundation/zope.interface/commit/a4ed0566f9dd9cd65af39576f6c8fdeb252d1ea9
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M src/zope/interface/_zope_interface_coptimizations.c

  Log Message:
  -----------
  MS VS stuck on c89 strikes again.


  Commit: 719851072c41ff0914def1368716a049859ed32a
      https://github.com/zopefoundation/zope.interface/commit/719851072c41ff0914def1368716a049859ed32a
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M benchmarks/micro.py

  Log Message:
  -----------
  More micro benchmarks.

Comparing to current master, there is no substantial difference.

+-------------------------------------------------------------+----------------+------------------------------+
| Benchmark                                                   | bench_master38 | bench_issue200               |
+=============================================================+================+==============================+
| call interface (alternate, no conform, not provided)        | 395 ns         | 414 ns: 1.05x slower (+5%)   |
+-------------------------------------------------------------+----------------+------------------------------+
| call interface (no alternate, valid conform, not provided)  | 250 ns         | 240 ns: 1.04x faster (-4%)   |
+-------------------------------------------------------------+----------------+------------------------------+
| read __module__                                             | 45.3 ns        | 43.4 ns: 1.04x faster (-4%)  |
+-------------------------------------------------------------+----------------+------------------------------+
| query adapter (no registrations)                            | 3.23 ms        | 3.31 ms: 1.02x slower (+2%)  |
+-------------------------------------------------------------+----------------+------------------------------+
| query adapter (all trivial registrations)                   | 3.93 ms        | 4.40 ms: 1.12x slower (+12%) |
+-------------------------------------------------------------+----------------+------------------------------+
| query adapter (all trivial registrations, wide inheritance) | 43.3 us        | 45.5 us: 1.05x slower (+5%)  |
+-------------------------------------------------------------+----------------+------------------------------+
| query adapter (all trivial registrations, deep inheritance) | 43.2 us        | 46.9 us: 1.09x slower (+9%)  |
+-------------------------------------------------------------+----------------+------------------------------+
| sort mixed                                                  | 361 us         | 354 us: 1.02x faster (-2%)   |
+-------------------------------------------------------------+----------------+------------------------------+
| contains (populated dict: interfaces)                       | 61.3 ns        | 59.7 ns: 1.03x faster (-3%)  |
+-------------------------------------------------------------+----------------+------------------------------+

Not significant (13): call interface (provides; deep); call interface (provides; wide); call interface (no alternate, no conform, not provided); call interface (alternate, invalid conform, not provided); read __name__; read __doc__; read providedBy; sort interfaces; sort implementedBy; contains (empty dict); contains (populated list: interfaces); contains (populated dict: implementedBy); contains (populated list: implementedBy)


  Commit: 6c2f71487eed46896647edc9dc770f1fd5da823b
      https://github.com/zopefoundation/zope.interface/commit/6c2f71487eed46896647edc9dc770f1fd5da823b
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M CHANGES.rst
    M benchmarks/micro.py
    M src/zope/interface/_zope_interface_coptimizations.c
    M src/zope/interface/declarations.py
    M src/zope/interface/interface.py
    M src/zope/interface/tests/__init__.py
    M src/zope/interface/tests/test_adapter.py
    M src/zope/interface/tests/test_declarations.py
    M src/zope/interface/tests/test_interface.py

  Log Message:
  -----------
  Merge pull request #201 from zopefoundation/issue200

Remove the bare except: statements.


Compare: https://github.com/zopefoundation/zope.interface/compare/abf12ada0a58...6c2f71487eed


More information about the checkins mailing list