#11310: Monkey-patch catchall `except:` statements so they at least don't catch
`KeyboardInterrupt` errors
------------------------------------------------+---------------------------
Reporter: jdemeyer | Owner: jason
Type: enhancement | Status:
positive_review
Priority: minor | Milestone: sage-5.2
Component: misc | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Keshav Kini
Authors: Jeroen Demeyer, Volker Braun | Merged in:
Dependencies: #13109 | Stopgaps:
------------------------------------------------+---------------------------
Changes (by {'newvalue': u'Jeroen Demeyer, Volker Braun', 'oldvalue': u'Jeroen
Demeyer'}):
* status: needs_work => positive_review
* author: Jeroen Demeyer => Jeroen Demeyer, Volker Braun
Old description:
> There are a lot places in the Sage library which use
> {{{
> except:
> }}}
> This is bad because it catches non-errors like `KeyboardInterrupt`.
>
> ----
>
> Then the patch [attachment:11310.patch] fixes some of these.
>
> Then the patch [attachment:11310_auto.patch] has ben auto-generated to
> replace all remaining instances of
> {{{
> except:
> }}}
> by
> {{{
> except StandardError:
> }}}
> and all instances of
> {{{
> raise Exception
> }}}
> by
> {{{
> raise RuntimeError
> }}}
>
> ----
>
> '''Apply''' [attachment:11310.patch] and [attachment:11310_auto.patch]
New description:
There are a lot places in the Sage library which use
{{{
except:
}}}
This is bad because it catches non-errors like `KeyboardInterrupt`.
----
Then the patch [attachment:11310.patch] fixes some of these.
Then the patch [attachment:11310_auto.patch] has ben auto-generated to
replace all remaining instances of
{{{
except:
}}}
by
{{{
except StandardError:
}}}
and all instances of
{{{
raise Exception
}}}
by
{{{
raise RuntimeError
}}}
----
'''Apply''' [attachment:trac_11310.patch] and
[attachment:11310_auto.patch]
--
Comment:
The new patch just fixes some fuzz 2 with #13109, back to positive review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11310#comment:24>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.