Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge #34547
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 18, 2022
2 parents e426400 + 9566546 commit 5789608
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 53 deletions.
78 changes: 38 additions & 40 deletions src/sage/interfaces/all.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
# interfaces to other interpreters

from sage.misc.lazy_import import lazy_import

from .frobby import frobby
from .four_ti_2 import four_ti_2
from .axiom import Axiom, axiom
from .fricas import FriCAS, fricas

from .sage0 import sage0, sage0_version, Sage
from .gap import gap, gap_reset_workspace, Gap
from .gap3 import gap3, gap3_version, Gap3
lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction'])
from .gfan import gfan, Gfan
from .giac import giac, Giac
from .gp import gp, gp_version, Gp
from .gnuplot import gnuplot
from .kash import kash, kash_version, Kash
from .lisp import lisp, Lisp
# import problems
#from maxima_lib import maxima_lib
from .maxima import maxima, Maxima
from .singular import singular, singular_version, Singular

from .magma import magma, Magma
from .magma_free import magma_free
from .macaulay2 import macaulay2, Macaulay2
from .maple import maple, Maple
lazy_import('sage.interfaces.maxima', ['maxima', 'Maxima'])
from .mathematica import mathematica, Mathematica
from .mathics import mathics, Mathics
from .matlab import matlab, matlab_version, Matlab
from .mupad import mupad, Mupad # NOT functional yet
from .mwrank import mwrank, Mwrank
from .octave import octave, Octave
from .polymake import polymake
from .qepcad import qepcad, qepcad_version, qepcad_formula
from .qsieve import qsieve
from .singular import singular, singular_version, Singular
from .sage0 import sage0 as sage0, sage0_version, Sage
from .scilab import scilab
from .tachyon import tachyon_rt
from .psage import PSage
from .ecm import ECM, ecm
from .povray import povray
from .lie import lie, LiE
from .r import r, R, r_version
from .read_data import read_data

interfaces = ['gap', 'gap3', 'giac', 'gp', 'mathematica', 'gnuplot', \
'kash', 'magma', 'macaulay2', 'maple', 'maxima', \
'mathematica', 'mwrank', 'octave', 'r', \
'singular', 'sage0', 'sage']
from sage.misc.lazy_import import lazy_import

lazy_import('sage.interfaces.axiom', ['Axiom', 'axiom'])
lazy_import('sage.interfaces.ecm', ['ECM', 'ecm'])
lazy_import('sage.interfaces.four_ti_2', 'four_ti_2')
lazy_import('sage.interfaces.fricas', ['FriCAS', 'fricas'])
lazy_import('sage.interfaces.frobby', 'frobby')
lazy_import('sage.interfaces.gap3', ['gap3', 'gap3_version', 'Gap3'])
lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction'])
lazy_import('sage.interfaces.gfan', ['gfan', 'Gfan'])
lazy_import('sage.interfaces.giac', ['giac', 'Giac'])
lazy_import('sage.interfaces.gnuplot', 'gnuplot')
lazy_import('sage.interfaces.kash', ['kash', 'kash_version', 'Kash'])
lazy_import('sage.interfaces.lie', ['lie', 'LiE'])
lazy_import('sage.interfaces.lisp', ['lisp', 'Lisp'])
lazy_import('sage.interfaces.macaulay2', ['macaulay2', 'Macaulay2'])
lazy_import('sage.interfaces.magma_free', 'magma_free')
lazy_import('sage.interfaces.maple', ['maple', 'Maple'])
lazy_import('sage.interfaces.mathematica', ['mathematica', 'Mathematica'])
lazy_import('sage.interfaces.mathics', ['mathics', 'Mathics'])
lazy_import('sage.interfaces.matlab', ['matlab', 'matlab_version', 'Matlab'])
lazy_import('sage.interfaces.mupad', ['mupad', 'Mupad']) # NOT functional yet
lazy_import('sage.interfaces.mwrank', ['mwrank', 'Mwrank'])
lazy_import('sage.interfaces.octave', ['octave', 'Octave'])
lazy_import('sage.interfaces.povray', 'povray')
lazy_import('sage.interfaces.psage', 'PSage')
lazy_import('sage.interfaces.qepcad', ['qepcad', 'qepcad_version', 'qepcad_formula'])
lazy_import('sage.interfaces.qsieve', 'qsieve')
lazy_import('sage.interfaces.r', ['r', 'R', 'r_version'])
lazy_import('sage.interfaces.read_data', 'read_data')
lazy_import('sage.interfaces.scilab', 'scilab')
lazy_import('sage.interfaces.tachyon', 'tachyon_rt')

try:
from sage.repl.rich_output.display_manager import get_display_manager as _get_display_manager
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/axiom.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: axiom.__reduce__()
sage: Axiom().__reduce__()
(<function reduce_load_Axiom at 0x...>, ())
sage: f, args = _
sage: f(*args)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/giac.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: giac.__reduce__()
sage: Giac().__reduce__()
(<function reduce_load_Giac at 0x...>, ())
sage: f, args = _
sage: f(*args)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/kash.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def _function_call_string(self, function, args, kwds):
EXAMPLES::
sage: kash._function_call_string('Expand', ['x', 'y'], ['Prec:=10'])
sage: Kash()._function_call_string('Expand', ['x', 'y'], ['Prec:=10'])
'Expand(x,y,rec(Prec:=10))'
"""
if not kwds:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/lie.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: lie.__reduce__()
sage: LiE().__reduce__()
(<function reduce_load_lie at 0x...>, ())
"""
return reduce_load_lie, tuple([])
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/lisp.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: lisp.__reduce__()
sage: Lisp().__reduce__()
(<function reduce_load_Lisp at 0x...>, ())
"""
return reduce_load_Lisp, tuple([])
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/macaulay2.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def __reduce__(self):
EXAMPLES::
sage: rlm2, t = macaulay2.__reduce__()
sage: rlm2, t = Macaulay2().__reduce__()
sage: rlm2(*t)
Macaulay2
"""
Expand Down
1 change: 1 addition & 0 deletions src/sage/interfaces/magma.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ def _preparse(self, s):
EXAMPLES::
sage: magma = Magma()
sage: magma._preparse_colon_equals = False
sage: magma._preparse('a = 5')
'a = 5'
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/maple.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: maple.__reduce__()
sage: Maple().__reduce__()
(<function reduce_load_Maple at 0x...>, ())
sage: f, args = _
sage: f(*args)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/mupad.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: mupad.__reduce__()
sage: Mupad().__reduce__()
(<function reduce_load_mupad at 0x...>, ())
"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/mwrank.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: mwrank.__reduce__()
sage: Mwrank().__reduce__()
(<function _reduce_load_mwrank at 0x...>, ())
"""

Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/octave.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def __reduce__(self):
"""
EXAMPLES::
sage: octave.__reduce__()
sage: Octave().__reduce__()
(<function reduce_load_Octave at 0x...>, ())
"""
return reduce_load_Octave, tuple([])
Expand Down
2 changes: 0 additions & 2 deletions src/sage/rings/finite_rings/integer_mod.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ from sage.libs.pari.all import pari, PariError
import sage.rings.integer_ring as integer_ring
import sage.rings.rational_field

import sage.interfaces.all

import sage.rings.integer
cimport sage.rings.integer
from sage.rings.integer cimport Integer
Expand Down
1 change: 0 additions & 1 deletion src/sage/rings/finite_rings/integer_mod_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@

from sage.libs.pari.all import pari, PariError

import sage.interfaces.all
from sage.misc.cachefunc import cached_method

from sage.structure.factory import UniqueFactory
Expand Down

0 comments on commit 5789608

Please sign in to comment.