enthought / envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
http://docs.enthought.com/envisage/
Other
82 stars 26 forks source link

Fix use of ExtensionPoint class for storage of global state #545

Closed mdickinson closed 1 year ago

mdickinson commented 1 year ago

This PR cleans up some odd use of global state (an extension registry that lived on the ExtensionPoint trait type class) that's never used in practice.

In detail:

My original plan was to deprecate calls to bind_extension_point that didn't specify a registry. That changed when I discovered that those calls only work after a deliberate injection of a registry onto the ExtensionPoint trait type class. To the best of my knowledge, no code is doing that (outside of test_extension_point_binding in this package), and all uses of bind_extension_point that I found in the wild are already supplying a registry explicitly. I also found no uses of the ExtensionPoint.bind static method. So I think in this case deprecation is unnecessary and we can simply remove the functionality.

xref: #97