ParaView python backward compatibility mechanism does not allow to change enumeration value
When changing the enumeration value of a property in a proxy, a user using paraview.compatibility would expect to be able to use the old value in setter and getter. It is possible to set it but it is not possible to get the value, as it is stored in the locals of the python object hence no backward compatibility code is ever called.
How to reproduce :
- Apply this backwardCompat.patch on master. This patch change an enum name from "Points" to "Foo" in the PlotDataOverTime filter, and tries to handle the backward compatibility.
- build paraview with python enabled
- run paraview
- open python shell
- run the following commands
paraview.compatibility.major=5 paraview.compatibility.major=5 Wavelet() a=PlotDataOverTime() a.FieldAssociation = "Cells" a.FieldAssociation = "Points" -> the setter is working great a.FieldAssociation -> Here we expect "Points" but we get "Foo"
I added a print trace to the getter, it is never called.