msg85784 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-04-08 21:28 |
I configured and built Python 2.6.2c1 on Solaris 10 using gcc 4.2. All tests pass except cmath: % LD_LIBRARY_PATH=. ./python Lib/test/regrtest.py -v test_cmath test_cmath test_abs (test.test_cmath.CMathTests) ... ok test_cmath_matches_math (test.test_cmath.CMathTests) ... ok test_constants (test.test_cmath.CMathTests) ... ok test_input_type (test.test_cmath.CMathTests) ... ok test_isinf (test.test_cmath.CMathTests) ... ok test_isnan (test.test_cmath.CMathTests) ... ok test_phase (test.test_cmath.CMathTests) ... ok test_polar (test.test_cmath.CMathTests) ... ok test_rect (test.test_cmath.CMathTests) ... ok test_specific_values (test.test_cmath.CMathTests) ... FAIL test_user_object (test.test_cmath.CMathTests) ... ok ====================================================================== FAIL: test_specific_values (test.test_cmath.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) ---------------------------------------------------------------------- Ran 11 tests in 0.048s FAILED (failures=1) test test_cmath failed -- Traceback (most recent call last): File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) 1 test failed: test_cmath Since we are so close to release I'm assigning it to Barry, though Mark Dickinson is probably the best person to look at this problem. I think this is a long-standing Solaris/cmath issue. I'm sorry Mark and I didn't connect long enough at PyCon to dig into this. It may not be serious enough to hold up a final release, but I wanted to mention the problem so it's recognized. |
|
|
msg85789 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2009-04-09 01:57 |
I'll mark this as a release blocker for 2.6.2 for now, until Mark weighs in. |
|
|
msg85844 - (view) |
Author: Mark Dickinson (mark.dickinson) *  |
Date: 2009-04-11 09:12 |
Sorry for the late reply: I've been away for a few days. This looks like the same problem as issue 4575, so should already be fixed in the trunk and py3k. It looks as though I never got around to backporting the fix to 2.6 (or 3.0). I'll do that today. |
|
|
msg85847 - (view) |
Author: Mark Dickinson (mark.dickinson) *  |
Date: 2009-04-11 10:12 |
Here's a patch that backports the corresponding changes from trunk. Skip, can you confirm that this fixes the issue? |
|
|
msg85848 - (view) |
Author: Mark Dickinson (mark.dickinson) *  |
Date: 2009-04-11 10:31 |
Just to say, I'm a bit uncomfortable with a patch this large going into a release candidate. It's all code that's been backported from 2.7, so it *should* be okay, but I really don't want to be responsible for breaking 2.6.2. The test failure that Skip reports *is* due to a bug, but the bug is platform-specific (only affects x86 platforms where the math library doesn't have isinf or isnan---in practice, that's only Solaris/x86), and it's a bug in a somewhat obscure corner case (overflow in cmath.acosh) that's not likely to affect many people. I don't think the (small, I hope) risk of breaking a release candidate is worth the (even smaller, IMO) benefit from fixing this bug. If Skip confirms that the patch works, I'd suggest that it can wait for 2.6.3. Assigning back to Barry for pronouncement. |
|
|
msg85858 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-04-11 14:06 |
Mark> Here's a patch that backports the corresponding changes from Mark> trunk. Mark> Skip, can you confirm that this fixes the issue? Indeed, your patch appears to fix the problem: % LD_LIBRARY_PATH=. ./python Lib/test/regrtest.py -v test_cmath test_cmath test_abs (test.test_cmath.CMathTests) ... ok test_cmath_matches_math (test.test_cmath.CMathTests) ... ok test_constants (test.test_cmath.CMathTests) ... ok test_input_type (test.test_cmath.CMathTests) ... ok test_isinf (test.test_cmath.CMathTests) ... ok test_isnan (test.test_cmath.CMathTests) ... ok test_phase (test.test_cmath.CMathTests) ... ok test_polar (test.test_cmath.CMathTests) ... ok test_rect (test.test_cmath.CMathTests) ... ok test_specific_values (test.test_cmath.CMathTests) ... ok test_user_object (test.test_cmath.CMathTests) ... ok ---------------------------------------------------------------------- Ran 11 tests in 0.063s OK 1 test OK. I'll leave it to you and Barry to consider if the patch is too hefty for backport. Skip |
|
|
msg85860 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
Date: 2009-04-11 14:24 |
FWIW, with the patch applied all tests still pass on Mac OS X 10.5.6 (Intel). S |
|
|
msg85947 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2009-04-13 13:58 |
We'll omit this for 2.6.2. Mark, please feel free to apply it once 2.6.2 is released so that it makes it into 2.6.3. |
|
|
msg85948 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2009-04-13 14:00 |
Accepted for 2.6.3. |
|
|
msg87127 - (view) |
Author: Mark Dickinson (mark.dickinson) *  |
Date: 2009-05-04 13:59 |
Applied in r72275. I've also applied the same changes to the release30-maint branch in r72277. |
|
|