grafanalib icon indicating copy to clipboard operation
grafanalib copied to clipboard

Make all Grafanalib objects immutable

Open jml opened this issue 7 years ago • 1 comments

I would like to make all Grafanalib objects immutable, using attrs's frozen setting (see http://www.attrs.org/en/stable/examples.html#immutability).

Pros

  • Easier to reason about
  • Fewer bugs
  • Reduced API support surface (don't have to worry about behaviour when people change things)

Cons

  • People might be mutating things in their current dashboards, and this will break those changes.

I welcome input from existing users.

jml avatar Jan 11 '18 11:01 jml

Is this still a concern?

matthewmrichter avatar Mar 20 '20 15:03 matthewmrichter