| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82654 | mark.dickinson | 2010-07-08 22:15:36 +0100 (Thu, 08 Jul 2010) | 3 lines
Issue #9136: Profiling Decimal gave 'dictionary changed size during iteration'.
Remove the use of locals() that caused this error.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82646 | mark.dickinson | 2010-07-08 18:23:40 +0100 (Thu, 08 Jul 2010) | 1 line
In test_decimal, convert heuristic for skipping tests into an explicit skiplist.
........
r82649 | mark.dickinson | 2010-07-08 20:03:34 +0100 (Thu, 08 Jul 2010) | 1 line
Fix a performance issue in Decimal.pow. Thanks Stefan Krah for finding this.
........
r82650 | mark.dickinson | 2010-07-08 20:09:16 +0100 (Thu, 08 Jul 2010) | 1 line
Fix misplaced exactness check that was causing unnecessary work in Decimal.__pow__.
........
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When a Decimal operation raises multiple signals and more than one of
those signals is trapped, the specification determines the order in
which the signals should be handled. In many cases this order wasn't
being followed, leading to the wrong Python exception being raised.
This commit fixes those cases, and adds extra tests. The tests are
only enabled when EXTENDEDERRORTESTS is True, since they involve
rerunning each Decimal testcase several times.
|
| |
|
|
|
|
|
|
| |
Also rewrite the Decimal __hash__ method so that it doesn't rely on
float('inf') being valid: float('inf') could raise an exception on
platforms not using IEEE 754 arithmetic.
|
| |
|
|
|
|
|
|
|
| |
Float to decimal comparison operations now return a result based on
the numeric values of the operands. Decimal.__hash__ has also been
fixed so that Decimal and float values that compare equal have equal
hash value.
|
|
|
|
| |
logical_invert; don't use integer literals with a leading zero.
|
|
|
|
|
|
| |
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted. Thanks
Juan José Conti for the patch.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
arguments with more digits than the current context precision.
Bug reported by Stefan Krah.
|
|
|
|
| |
accept ints and longs for the second argument.
|
|
|
|
| |
finite non-subnormal values, even those with exponent > Emax.
|
|
|
|
|
|
| |
into the available precision. (Tests for this change are included in
the most recent set of testcases from the Decimal Specification site;
those testcases will be updated shortly.)
|
|
|
|
| |
formatting: both are now right-aligned by default.
|
|
|
|
| |
int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext.
|
|
|
|
| |
with no type specifier.
|
|
|
|
| |
Decimal.compare_total_mag.
|
|
|
|
|
| |
digits, as recommended by the specification. (Backport of r74279 from
py3k.)
|
| |
|
|
|
|
| |
added for 'n' formats with non-repeating thousands-separator.
|
|
|
|
| |
to Decimal __format__ method.
|
|
|
|
| |
alignment.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
comments at top of decimal.py. (But note that the from_float
method itself with still not be usable before Python 2.7.)
See issue 4796 for discussion.
|
| |
|
| |
|
| |
|
|
|
|
| |
constants in the decimal module. (Dec_0 becomes _Dec_0, etc.)
|
|
|
|
|
|
| |
give correct results in the case where one argument is a quiet NaN
and the other is a finite number that requires rounding.
Thanks Mark Dickinson.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* crashes on memory allocation failure found with failmalloc
* memory leaks found with valgrind
* compiler warnings in opt mode which would lead to invalid memory reads
* problem using wrong name in decimal module reported by pychecker
Update the valgrind suppressions file with new leaks that are small/one-time
leaks we don't care about (ie, they are too hard to fix).
TBR=barry
TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes)
in opt mode:
valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \
-x test_logging test_ssl test_multiprocessing
valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
./python -E -tt ./Lib/test/regrtest.py test_multiprocessing
for i in `seq 1 4000` ; do
LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \
./python -c pass
done
At least some of these fixes should probably be backported to 2.5.
|
|
|
|
| |
be blocked explicitly so that collections.Hashable remains meaningful
|
|
|
|
|
|
|
|
| |
that the behaviour of Decimal doesn't change if/when re.UNICODE becomes
assumed in Python 3.0.
Also add a check that alternative Unicode digits (e.g. u'\N{FULLWIDTH
DIGIT ONE}') are *not* accepted in a numeric string.
|
|
|
|
| |
(as documented) rather than True and False.
|
|
|
|
|
|
|
|
|
|
| |
at reducing the size of the diff between the 2.x decimal.py
and 3.x decimal.py and thereby making future merges easier:
- replace one instnace of an old-style raise statement
- define __div__ in terms of __truediv__ instead of the
other way around
- make wording match on an exception message
|
|
|
|
| |
'Context flags get set, not incremented'
|
| |
|
|
|
|
|
| |
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
|
|
|
|
| |
was not explicitly supplied.
|
| |
|
| |
|
| |
|
| |
|
| |
|