napari / napari-animation

A napari plugin for making animations
https://napari.github.io/napari-animation/
Other
74 stars 27 forks source link

Bugfix: Use importlib.metadata.version instead import from _version #190

Closed psobolewskiPhD closed 7 months ago

psobolewskiPhD commented 7 months ago

Closes: https://github.com/napari/napari-animation/issues/177

In this PR I get the napari version using importlib.metadata.version instead of importing from _version. In older napari versions the variable name was different, resulting in the error shown in #177 This method should be backwards compatible for any napari on python >= 3.8 To be safe for older python also try importlib_metadata but if that doesn't work, then just note the version as older than 0.4.15, the first version to not support python 3.7.