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

Simplify ImportManager by using importlib #465

Closed corranwebster closed 2 years ago

corranwebster commented 2 years ago

Simple drive-by modernization as I was reading code. Should have no effective change in behaviour.

I can't remove the other import usage easily however as it is doing a from ... import ...-style import.

corranwebster commented 2 years ago

Do you know why we need a full eval there rather than just a getattr?

No idea. If I had to guess it would be a hack to allow dotted imports like foo.bar:Bar.baz, but it would not shock me if it was used for more general things.

Obviously didn't want to touch it since I didn't know the scope of usage, but I'd be happy to see it go if it were safe.