Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/sage/categories/pushout.py
Original file line number Diff line number Diff line change
Expand Up @@ -3976,14 +3976,20 @@ class BlackBoxConstructionFunctor(ConstructionFunctor):
EXAMPLES::

sage: from sage.categories.pushout import BlackBoxConstructionFunctor

sage: # needs sage.libs.gap
sage: from sage.interfaces.gap import gap
sage: FG = BlackBoxConstructionFunctor(gap)
sage: FS = BlackBoxConstructionFunctor(singular)
sage: FG
BlackBoxConstructionFunctor
sage: FG(ZZ) # needs sage.libs.gap
sage: FG(ZZ)
Integers
sage: FG(ZZ).parent() # needs sage.libs.gap
sage: FG(ZZ).parent()
Gap
sage: FG == loads(dumps(FG))
True

sage: FS = BlackBoxConstructionFunctor(singular)
sage: FS(QQ['t']) # needs sage.libs.singular
polynomial ring, over a field, global ordering
// coefficients: QQ
Expand All @@ -3993,8 +3999,6 @@ class BlackBoxConstructionFunctor(ConstructionFunctor):
// block 2 : ordering C
sage: FG == FS # needs sage.libs.gap sage.libs.singular
False
sage: FG == loads(dumps(FG)) # needs sage.libs.gap
True
"""
rank = 100

Expand Down
1 change: 1 addition & 0 deletions src/sage/doctest/forker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,7 @@ def report_unexpected_exception(self, out, test, example, exc_info):

EXAMPLES::

sage: from sage.interfaces.sage0 import sage0
sage: sage0.quit()
sage: _ = sage0.eval("import doctest, sys, os, multiprocessing, subprocess")
sage: _ = sage0.eval("from sage.doctest.parsing import SageOutputChecker")
Expand Down
20 changes: 11 additions & 9 deletions src/sage/interfaces/all.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# interfaces to other interpreters

from sage.interfaces.sage0 import sage0, sage0_version, Sage
from sage.interfaces.gap import gap, gap_reset_workspace, Gap
from sage.interfaces.gp import gp, gp_version, Gp
# import problems
# from maxima_lib import maxima_lib
from sage.interfaces.maxima import maxima, Maxima
from sage.interfaces.singular import singular, singular_version, Singular

from sage.interfaces.magma import magma, Magma
from sage.interfaces.polymake import polymake
try:
# from maxima_lib import maxima_lib
from sage.interfaces.maxima import maxima, Maxima
except ImportError:
pass

from sage.misc.lazy_import import lazy_import

lazy_import('sage.interfaces.sage0', ['sage0', 'sage0_version', 'Sage'])
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.gap', ['gap', 'gap_reset_workspace', 'Gap'])
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.gp', ['gp', 'gp_version', 'Gp'])
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', ['magma', 'Magma'])
lazy_import('sage.interfaces.magma_free', 'magma_free')
lazy_import('sage.interfaces.maple', ['maple', 'Maple'])
lazy_import('sage.interfaces.mathematica', ['mathematica', 'Mathematica'])
Expand All @@ -35,12 +35,14 @@
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.polymake', 'polymake')
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.r', ['r', 'R', 'r_version'])
lazy_import('sage.interfaces.read_data', 'read_data')
lazy_import('sage.interfaces.scilab', 'scilab')
lazy_import('sage.interfaces.singular', ['singular', 'singular_version', 'Singular'])
lazy_import('sage.interfaces.tachyon', 'tachyon_rt')

# The following variable is used by sage-shell-mode in emacs:
Expand Down
1 change: 1 addition & 0 deletions src/sage/interfaces/expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ def _eval_line(self, line, allow_use_file=True, wait_for_prompt=True, restart_if

TESTS::

sage: from sage.interfaces.singular import singular
sage: singular._eval_line('def a=3;')
''
sage: singular('a')
Expand Down
2 changes: 2 additions & 0 deletions src/sage/interfaces/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ def _eval_line(self, line, allow_use_file=True, wait_for_prompt=True, restart_if

TESTS::

sage: from sage.interfaces.gap import gap
sage: gap._eval_line('2+2;')
'4'

Expand Down Expand Up @@ -1124,6 +1125,7 @@ def __reduce__(self):
"""
EXAMPLES::

sage: from sage.interfaces.gap import gap
sage: gap.__reduce__()
(<function reduce_load_GAP at 0x...>, ())
sage: f, args = _
Expand Down
3 changes: 2 additions & 1 deletion src/sage/interfaces/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def _repr_(self):

EXAMPLES::

sage: gp # indirect doctest
sage: gp # indirect doctest
PARI/GP interpreter
"""
return 'PARI/GP interpreter'
Expand All @@ -279,6 +279,7 @@ def __reduce__(self):
"""
EXAMPLES::

sage: from sage.interfaces.gp import gp
sage: gp.__reduce__()
(<function reduce_load_GP at 0x...>, ())
sage: f, args = _
Expand Down
1 change: 1 addition & 0 deletions src/sage/interfaces/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def __getattr__(self, attrname):
TESTS::

sage: from sage.structure.parent_base import ParentWithBase
sage: from sage.interfaces.singular import singular
sage: ParentWithBase.__getattribute__(singular, '_coerce_map_from_')
<bound method Singular._coerce_map_from_ of Singular>
"""
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 @@ -397,6 +397,7 @@ def __reduce__(self):

EXAMPLES::

sage: from sage.interfaces.magma import magma
sage: loads(dumps(magma)) is magma
True

Expand Down
1 change: 1 addition & 0 deletions src/sage/interfaces/polymake.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def __reduce__(self):
"""
EXAMPLES::

sage: from sage.interfaces.polymake import polymake
sage: loads(dumps(polymake)) is polymake
True

Expand Down
1 change: 1 addition & 0 deletions src/sage/interfaces/singular.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ def __reduce__(self):
"""
EXAMPLES::

sage: from sage.interfaces.singular import singular
sage: singular.__reduce__()
(<function reduce_load_Singular at 0x...>, ())
"""
Expand Down