Currently, a SimilaritySurface (and its subclasses) is not a (unique) SageMath parent but a (possibly mutable) SageObject.
As a result, some of the SageMath machinery, e.g., categories, is not accessible to such a surface. Furthermore, mutability means that we have trouble to use caching on such a surface, see e.g., #97. Note that currently even immutable surfaces are effectively mutable since their graphical_surface() is mutable which makes it harder to use surfaces in caches. Not being a parent means that we cannot define SageMath maps between such surfaces. The lack of uniqueness complicates pickling and also goes a bit against the SageMath philosophy where all parent objects are unique & immutable.
To make similarity surfaces unique parents, several things need to change:
Deprecate hidden state in SimilaritySurface, i.e., graphical_surface() and related methods.
Deprecate in_place=True methods on SimilaritySurface.
Deprecate creating a SimilaritySurface from a mutable surface.
Deprecate mutating the Surface underlying a SimilaritySurface. (Whenever such a mutation happens, we'll need to remove the surface from the UniqueParent cache.)
Find a better solution for ExtraLabel which does not work when using pickled objects from different sessions anyway: Deprecate label=None when calling add_polygon on infinite surfaces.
Make SimilaritySurface a UniqueParent and a point on the surface its Element. (The points are not of much interest but they seem to be the natural elements of a surface.) Consequently, when calling SimilaritySurface(S) for a mutable S, we take an immutable copy of S which won't work for infinite mutable surfaces.
Currently, a
SimilaritySurface
(and its subclasses) is not a (unique) SageMath parent but a (possibly mutable)SageObject
.As a result, some of the SageMath machinery, e.g., categories, is not accessible to such a surface. Furthermore, mutability means that we have trouble to use caching on such a surface, see e.g., #97. Note that currently even immutable surfaces are effectively mutable since their
graphical_surface()
is mutable which makes it harder to use surfaces in caches. Not being a parent means that we cannot define SageMath maps between such surfaces. The lack of uniqueness complicates pickling and also goes a bit against the SageMath philosophy where all parent objects are unique & immutable.To make similarity surfaces unique parents, several things need to change:
graphical_surface()
and related methods.in_place=True
methods on SimilaritySurface.ExtraLabel
which does not work when using pickled objects from different sessions anyway: Deprecatelabel=None
when callingadd_polygon
on infinite surfaces.SimilaritySurface(S)
for a mutableS
, we take an immutable copy ofS
which won't work for infinite mutable surfaces.