#5092 closed defect (fixed)
Primes()?? gets hung in len call; also bring coverage to 100% for primes.py
Reported by: | William Stein | Owned by: | William Stein |
---|---|---|---|
Priority: | major | Milestone: | sage-4.2 |
Component: | number theory | Keywords: | |
Cc: | Merged in: | sage-4.2.alpha1 | |
Authors: | William Stein | Reviewers: | Mike Hansen, Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Attachments (1)
Change History (14)
comment:1 Changed 14 years ago by
Summary: | Primes()?? gets hung in len call → [with patch; needs review] Primes()?? gets hung in len call |
---|
comment:2 Changed 14 years ago by
Summary: | [with patch; needs review] Primes()?? gets hung in len call → [with patch; needs review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
comment:3 Changed 14 years ago by
Summary: | [with patch; needs review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py → [with patch; needs work] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
comment:4 Changed 14 years ago by
Summary: | [with patch; needs work] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py → [with patch; positive review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
comment:5 follow-up: 6 Changed 14 years ago by
Summary: | [with patch; positive review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py → [with patch; needs work] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
This patch causes one doctest failure:
sage -t -long "devel/sage/sage/sets/set.py" ********************************************************************** File "/scratch/mabshoff/sage-3.3.alpha4/devel/sage/sage/sets/set.py", line 278: sage: Primes() < Set(QQ) Expected: True Got: False **********************************************************************
Cheers,
Michael
comment:6 Changed 14 years ago by
Replying to mabshoff:
This patch causes one doctest failure:
This is a weird test. I'm not even sure that it says anything meaningful. In fact, according to the documentation of cmp for Set, it doesn't:
\note{If $X < Y$ is true this does \emph{not} necessarily mean that $X$ is a subset of $Y$. Also, any two sets can be compared, which is a general Python philosophy.}
comment:7 Changed 14 years ago by
See #5933, which brings the coverage to 100% and was merged in 3.4.2.rc0.
comment:8 Changed 14 years ago by
Well, there is still a potential bug fix in here, so can someone take a look and extra a potential fix?
Cheers,
Michael
Changed 13 years ago by
Attachment: | trac_5092.patch added |
---|
comment:9 Changed 13 years ago by
Authors: | → William Stein |
---|---|
Status: | needs_work → needs_review |
I've rebased the patch of #5933.
comment:10 Changed 13 years ago by
Summary: | [with patch; needs work] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py → [with patch; needs review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
err, on top of #5933
comment:11 Changed 13 years ago by
Reviewers: | → Mike Hansen, Karl-Dieter Crisman |
---|---|
Status: | needs_review → positive_review |
Positive review. Unless you can provide an easily accessible example of where Primes(False) isn't Primes(True), but perhaps the first place that happens is waaay down the road...
comment:12 Changed 13 years ago by
Merged in: | → sage-4.2.alpha1 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
comment:13 Changed 13 years ago by
Summary: | [with patch; needs review] Primes()?? gets hung in len call; also bring coverage to 100% for primes.py → Primes()?? gets hung in len call; also bring coverage to 100% for primes.py |
---|
You don't need the first two lines below in cmp anymore.
Otherwise, it's a positive review.