sage.misc.latex, sage.repl.display.fancy_repr: Make imports more local
Closed this issue · 10 comments
(cherry-picked from #32432)
CC: @mwageringel @kwankyu
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: bdd0325
Reviewer: Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/32634
Author: Matthias Koeppe
What is the rationale of moving module-level import of have_program to function level?
Most modules that import from sage.misc.latex only import the latex function, which does not actually need to run any program; so removing this module-level import removes the indirect dependency on sage.misc.ostools (and hence on CPython- and Unix-specific code).
Replying to @mkoeppe:
Most modules that import from
sage.misc.latexonly import thelatexfunction, which does not actually need to run any program; so removing this module-level import removes the indirect dependency onsage.misc.ostools(and hence on CPython- and Unix-specific code).
If we need to care of these dependency issues because of the modularization effort, it might be useful to have a patchbot plugin to watch out increase of dependency among sage modules.
Reviewer: Kwankyu Lee
Changed branch from u/mkoeppe/sage_misc_latex__sage_repl_display_fancy_repr__make_imports_more_local to bdd0325