Napari 0.4.3 - viewer.dims.axis_labels now returns tuple istead of a list

Hi,

I just updated to napari 0.4.3 and noticed that

viewer.dims.axis_labels now return a tuple instead of a list version. This led to errors in my code…

I admit I did not read the release notes :-), so my question is, if this change is desired?

  • if yes, than I will try to adapt my code of course.
  • if not, than this might be an issue?

Looking at the git blame of viewer.dims.axis_labels leads to this PR where it’s mentioned as a breaking (and intended) change:

2 Likes

Thanks for linking to that diff. It was intentional, but there has been some discussion about using a napari EventedList in the future instead of the tuple, which would allow in place modification with event emission - something missing from a normal list. The tuple side steps this problem since in place modification isn’t possible at all. Sorry that this is still in flux here. I hope to have all this settled down soon!

1 Like

No problem. I already adapted a few lines and it works as expected again.

1 Like