[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-04 Thread Mark Dickinson
Mark Dickinson added the comment: Precedence fixed in r80753 through r80756. That still leaves open the problem of what flags should be set; however, we should discuss this in a separate issue. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-02 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: unit test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: Final patch (?!) fixes all the test failures due to exception precedence issues. -- Added file: http://bugs.python.org/file17167/issue8567_3.patch ___ Python tracker __

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: Better patch, that checks exception precedence for every test case when EXTENDEDERRORTEST is defined. With this patch, I get 11 test failures in test_decimal (down from 50 test failures before the Decimal._fix fix). Now we just have to track down the remaini

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-01 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file17162/issue8567.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-01 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file17163/issue8567.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a quick fix for Decimal._fix, that just makes sure that it raises exceptions in the appropriate order. I'll also try to apply the check_precedence methodology included in this patch to every single testcase. I don't think it's reasonable to add this t

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Stefan. The cdecimal and decnumber behaviour sounds like the ideal one to me. I'm not sure how easy it would be to adopt this behaviour for decimal: it could require some significant rewriting, so we may have to leave decimal as it is and call the f

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Stefan Krah
Stefan Krah added the comment: Mark, I'm very short of time today, so I hope I don't miss anything that you wrote. The model of decNumber (and libmpdec) is to accumulate any status (flags) that occurs in a function, regardless of whether a signal is trapped or not. Only at function exit the

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Raising priority: I'd like to get the precedence fix into 2.7. -- priority: normal -> high ___ Python tracker ___ _

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Regarding the flags that should be set, the relevant portion of the specification is at the top of the page mentioned above: """ For each condition, the corresponding signal in the context is given, along with the defined result. The value of the trap-enabler

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: -> unit test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +facundobatista, rhettinger, skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-04-29 Thread Mark Dickinson
New submission from Mark Dickinson : http://speleotrove.com/decimal/daexcep.html specifies a precedence for decimal exceptional conditions (scroll right to the bottom of the page): """The Clamped, Inexact, Rounded, and Subnormal conditions can coincide with each other or with other conditions.