Opened 18 months ago
Closed 17 months ago
#28675 closed defect (fixed)
Deprecate GraphicsArray import from sage.plot.graphics
Reported by:  egourgoulhon  Owned by:  

Priority:  major  Milestone:  sage9.0 
Component:  graphics  Keywords:  GraphicsArray 
Cc:  was, kcrisman  Merged in:  
Authors:  Eric Gourgoulhon  Reviewers:  Frédéric Chapoton 
Report Upstream:  N/A  Work issues:  
Branch:  87bc58a (Commits, GitHub, GitLab)  Commit:  87bc58a608cf303db209808e6b5ae9bbddef46fb 
Dependencies:  Stopgaps: 
Description (last modified by )
#27865 has refactored the class GraphicsArray
, making it a subclass of MultiGraphics
, and has moved its definition from src/sage/plot/graphics.py
to src/sage/plot/multigraphics.py
. As pointed out in https://groups.google.com/d/msg/sagedevel/eTl4DHcwnOo/uQSOtstWAwAJ, this has broken Sage's API: the import via
from sage.plot.graphics import GraphicsArray
does not longer work. This ticket makes it work again, but with the following deprecation notice:
DeprecationWarning: GraphicsArray must be imported from sage.plot.multigraphics and no longer from sage.plot.graphics. See https://trac.sagemath.org/28675 for details.
A possible shortcoming of the approach adopted here is that the deprecation message appears only at the first use of GraphicsArray
, not during the import
itself. Actually, I don't know if it is possible to generate a deprecation warning during some import.
Change History (12)
comment:1 Changed 18 months ago by
 Branch set to public/graphics/GraphicsArray_import28675
 Cc was added
 Commit set to e16951ee794cb76aefa181103ae7d3a07d5e7bcb
 Description modified (diff)
 Status changed from new to needs_review
 Summary changed from Redirect import of GraphicsArray to Deprecate GraphicsArray import from sage.plot.graphics
comment:2 Changed 18 months ago by
 Commit changed from e16951ee794cb76aefa181103ae7d3a07d5e7bcb to 87bc58a608cf303db209808e6b5ae9bbddef46fb
Branch pushed to git repo; I updated commit sha1. New commits:
87bc58a  Fix merge conflict of #28675 branch with Sage 9.0.beta4

comment:3 Changed 18 months ago by
The merge conflict solved above was due to the introduction of #27866 in Sage 9.0.beta4.
comment:4 Changed 18 months ago by
 Cc kcrisman added
comment:5 Changed 18 months ago by
 Description modified (diff)
comment:6 followups: ↓ 7 ↓ 8 Changed 18 months ago by
I like the spirit of this. Can you actually view this array and do the usual (old) methods with it for now? (I regret that I cannot actually test this due to time constraints  a sad refrain the past few years.) Anyway, if so and green patchbot, this is probably the best way to deal with this situation, unless William has other improvements he would suggest.
comment:7 in reply to: ↑ 6 Changed 18 months ago by
Replying to kcrisman:
I like the spirit of this. Can you actually view this array and do the usual (old) methods with it for now?
Yes absolutely, since the object constructed from sage.plot.graphics.GraphicsArray
is actually a
sage.plot.multigraphics.GraphicsArray
.
comment:8 in reply to: ↑ 6 Changed 17 months ago by
Replying to kcrisman:
Anyway, if so and green patchbot, this is probably the best way to deal with this situation, unless William has other improvements he would suggest.
The patchbot is still green...
comment:9 followup: ↓ 10 Changed 17 months ago by
 Reviewers set to Frédéric Chapoton
 Status changed from needs_review to positive_review
comment:10 in reply to: ↑ 9 Changed 17 months ago by
Thanks!
comment:11 Changed 17 months ago by
+1 thanks chapoton!
comment:12 Changed 17 months ago by
 Branch changed from public/graphics/GraphicsArray_import28675 to 87bc58a608cf303db209808e6b5ae9bbddef46fb
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Deprecation notice for GraphicsArray import from sage.plot.graphics