#15194: properly import exceptions for MIPSolver in #12418
-----------------------------+-----------------------------
   Reporter:  dimpase        |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-5.12
  Component:  coding theory  |         Keywords:
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:  #12418
   Stopgaps:                 |
-----------------------------+-----------------------------
 the exceptions are not properly imported there, and there are no doctests
 for them:
 {{{
 sage: delsarte_bound_additive_hamming_space(11,3,4,d_star=9)
 ---------------------------------------------------------------------------
 NameError                                 Traceback (most recent call
 last)
 <ipython-input-1-14fed6190a46> in <module>()
 ----> 1
 
delsarte_bound_additive_hamming_space(Integer(11),Integer(3),Integer(4),d_star=Integer(9))

 /usr/local/src/sage/sage-5.12.beta4/local/lib/python2.7/site-
 packages/sage/misc/lazy_import.so in
 sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:2550)()

 /usr/local/src/sage/sage-5.12.beta4/local/lib/python2.7/site-
 packages/sage/coding/delsarte_bounds.pyc in
 delsarte_bound_additive_hamming_space(n, d, q, d_star, q_base, isinteger,
 return_data, solver)
     261       try:
     262         bd=p.solve()
 --> 263       except sage.numerical.mip.MIPSolverException, exc:
     264         print "Solver exception: ", exc, exc.args
     265         if return_data:

 NameError: global name 'sage' is not defined
 }}}

 Attached is the patch that puts in proper imports for MIPSolver
 exceptions, and doctests for them.

--
Ticket URL: <http://trac.sagemath.org/ticket/15194>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to