-
-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monkey-patch catchall except:
statements so they at least don't catch KeyboardInterrupt
errors
#11310
Comments
comment:2
What's the problem with this ticket? I think it is a small enough change that it can be at least set for review. |
comment:3
Tests pass on 5.0. Jeroen, is this ready for review, or do you want to add more stuff? |
comment:4
I would like to fix the following from
|
Author: Jeroen Demeyer |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:7
Changing these bare except statements to |
comment:8
Replying to @kini:
Then what should it be? According to the hierarchy of exceptions I think About the |
comment:9
I mean that the code should be inspected and the appropriate exception class should be used in each case. Of course, this is not easy, considering that the autogenerated patch is more than 100 KB. But still, it should be done. |
comment:10
I'm currently going though the auto-generated patch and fixing the obvious things by hand. Note that the title of this ticket isn't "totally fix all exceptions inside Sage". The main point is to not catch |
comment:11
Replying to @jdemeyer:
Other than some of the |
comment:12
Replying to @jdemeyer:
Well, the title is a bit misleading I guess. Sure, it's not "totally fix all exceptions inside Sage", but it does seem like "totally fix some exceptions inside Sage" :) |
except:
statements so they at least don't catch KeyboardInterrupt
errors
This comment has been minimized.
This comment has been minimized.
comment:14
Okay, I changed a lot of things by hand, needs_review. |
This comment has been minimized.
This comment has been minimized.
comment:16
Patchbot says trailing whitespace :P |
comment:17
Hmm.. a lot of doctests are failing:
|
comment:18
I think something changed in the patches between the last time I ran |
comment:19
Patchbot says it's fine over the whole library. Looks good to me. |
Reviewer: Keshav Kini |
Rediffed patch |
This comment has been minimized.
This comment has been minimized.
Changed author from Jeroen Demeyer to Jeroen Demeyer, Volker Braun |
comment:24
Attachment: trac_11310.patch.gz The new patch just fixes some fuzz 2 with #13109, back to positive review. |
This comment has been minimized.
This comment has been minimized.
Additional patch |
This comment has been minimized.
This comment has been minimized.
comment:28
Attachment: 11310_psage.patch.gz Additional patch attachment: 11310_psage.patch needs review (there were sporadic doctest failures in |
comment:30
Looks good! In a perfect world |
comment:31
psage is a weird beast. I have seen doctest errors in psage which change from version to version. I couldn't explain it, nor do I know the fix. See #12061. |
Merged: sage-5.3.beta1 |
comment:33
This causes issues with Python 3. See #15620. |
There are a lot places in the Sage library which use
This is bad because it catches non-errors like
KeyboardInterrupt
.Then the patch attachment: 11310_auto.patch has ben auto-generated to replace all instances of
by
and all instances of
by
Apply attachment: trac_11310.patch and attachment: 11310_auto.patch and attachment: 11310_psage.patch.
Depends on #13109
CC: @kini
Component: misc
Author: Jeroen Demeyer, Volker Braun
Reviewer: Keshav Kini
Merged: sage-5.3.beta1
Issue created by migration from https://trac.sagemath.org/ticket/11310
The text was updated successfully, but these errors were encountered: