#11945: Throw exception instead of printing error in c_graph.pyx
-------------------------------------------------+-------------------------
       Reporter:  kini                           |        Owner:  jason,
           Type:  defect                         |  ncohen, rlm
       Priority:  major                          |       Status:  new
      Component:  graph theory                   |    Milestone:  sage-6.4
       Keywords:  cython exception cpdef print   |   Resolution:
  c_graph                                        |    Merged in:
        Authors:  Jeroen Demeyer                 |    Reviewers:
Report Upstream:  N/A                            |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------
Changes (by {'newvalue': u'Jeroen Demeyer', 'oldvalue': ''}):

 * author:   => Jeroen Demeyer
 * milestone:   => sage-6.4


Old description:

> The following text currently occurs in
> `$SAGE_ROOT/devel/sage/sage/graphs/base/c_graph.pyx`:
>
> {{{
> #!python
>         # The following is due to a hard to reproduce bug in Cython where
> except,
>         # cpdef, and classes don't play well together:
>         print "Not Implemented!"
>         # raise NotImplementedError() ... results in:
>         # Exception exceptions.NotImplementedError: NotImplementedError()
> in 'sage.graphs.base.c_graph.CGraph.has_arc' ignored
>         # False
> }}}
>
> These lines were written by Robert Miller in 2009. This ticket is just to
> keep track of this, since it should eventually be done properly once the
> Cython bug is gone.

New description:

 The following text currently occurs in
 `$SAGE_ROOT/devel/sage/sage/graphs/base/c_graph.pyx`:

 {{{
 #!python
         # The following is due to a hard to reproduce bug in Cython where
 except,
         # cpdef, and classes don't play well together:
         print "Not Implemented!"
         # raise NotImplementedError() ... results in:
         # Exception exceptions.NotImplementedError: NotImplementedError()
 in 'sage.graphs.base.c_graph.CGraph.has_arc' ignored
         # False
 }}}

 There is no fact no Cython bug, it's just a matter of properly declaring
 the `except` value in the `.pxd` file. The attached patch further cleans
 up the `except` values a bit.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/11945#comment:3>
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/d/optout.

Reply via email to