#12691 closed enhancement (fixed)
Create a stopgap warning
Reported by: | roed | Owned by: | jason |
---|---|---|---|
Priority: | major | Milestone: | sage-5.0 |
Component: | misc | Keywords: | rd2 |
Cc: | Merged in: | sage-5.0.beta10 | |
Authors: | David Roe, William Stein | Reviewers: | R. Andrew Ohana |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #12702 | Stopgaps: |
Description (last modified by )
Sometimes issues can produce mathematically incorrect results, and we should warn users of the problem. If the issue is fixed promptly then nothing more needs to be done, but sometimes tickets remain unresolved for months or years (c.f. #11358). This ticket adds a function that makes it easy to create a second ticket warning users of the problem while it's being resolved.
On trac, this functionality will be supported by the Stopgaps field. Create a new ticket that uses the stopgap
function and include a link to it in the Stopgaps field in the original ticket.
Attachments (2)
Change History (16)
comment:1 Changed 7 years ago by
- Status changed from new to needs_review
Changed 7 years ago by
comment:2 Changed 7 years ago by
- Keywords rd2 added
- Status changed from needs_review to positive_review
comment:3 Changed 7 years ago by
See #12702 for a followup.
comment:4 Changed 7 years ago by
I think this code is too slow. We want it to be highly optimized so as to not have much of a performance penalty for introducing a stopgap. I'm going to attach a different patch that implements stopgaps, and is an *order of magnitude* faster than this code:
sage: timeit("sage.misc.misc.stopgap('abc', 123)", number=10^5) 100000 loops, best of 3: 2.49 µs per loop sage: import sage.misc.stopgap sage: timeit("sage.misc.stopgap.stopgap('abc', 123)", number=10^5) 100000 loops, best of 3: 388 ns per loop sage: 2.49 / .388 6.41752577319588
comment:5 Changed 7 years ago by
- Status changed from positive_review to needs_work
comment:6 Changed 7 years ago by
- Status changed from needs_work to needs_review
Changed 7 years ago by
comment:7 Changed 7 years ago by
- Reviewers set to R. Andrew Ohana
- Status changed from needs_review to positive_review
everything looks good to me and works how I expect it to, positive review!
comment:8 Changed 7 years ago by
- Description modified (diff)
comment:9 Changed 7 years ago by
Just clarification; this doesn't
create a second ticket warning users of the problem
right, or even 'make it easy' to do so? It seems to function more like deprecations; it doesn't do anything, but warns users that something might be wrong. Let me know if I'm wrong about this, otherwise I hope to use it in the future.
Nice addition.
comment:10 Changed 7 years ago by
kcrisman: you're right, it doesn't create a ticket or make it easy to create a ticket, but it makes it easy to print a nice warning, like a deprecation. Does the documentation at #12702 make it clearer?
comment:11 Changed 7 years ago by
Yeah, that's great. Wish I could be helping with this, but looks like RD2 is going very well.
comment:12 Changed 7 years ago by
- Dependencies set to #12702
comment:13 Changed 7 years ago by
- Merged in set to sage-5.0.beta10
- Resolution set to fixed
- Status changed from positive_review to closed
comment:14 Changed 7 years ago by
Why not display the stopgap warnings in doctests? I would prefer documentation to show the stopgap warnings. It also would allow to see which parts of Sage are affected by stopgapped tickets.
It would also prevent sillyness like
sage: 1+1 ******************************************************************************** Addition of integers can sometimes return wrong results. This issue is being tracked at http://trac.sagemath.org/sage_trac/ticket/123456. ******************************************************************************** 2
Looks good.