| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
raise InvalidOperation (and return False if InvalidOperation is trapped).
|
| |
|
| |
|
|
|
|
|
| |
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
|
| |
|
|
|
|
| |
by the current context. Thanks Mark Dickinson.
|
| |
|
|
|
|
| |
is now simpler. Thanks Mark Dickinson.
|
| |
|
|
|
|
| |
coding. Thanks Mark Dickinson.
|
| |
|
|
|
|
| |
used types. Thanks Mark Dickinson.
|
|
|
|
|
|
|
|
|
|
| |
number: now it does not store the mantissa as a tuple
of numbers, but as a string.
This avoids a lot of conversions, and achieves a
speedup of 40%. The API remains intact.
Thanks Mark Dickinson.
|
|
|
|
|
|
|
|
| |
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
|
|
|
|
| |
available when necessary without recomputing. Thanks Mark Dickinson
|
|
|
|
|
|
|
|
|
|
|
| |
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
|
|
|
|
| |
numbers.
|
|
|
|
| |
divideint and divmod). Thanks Mark Dickinson.
|
|
|
|
|
| |
executed through a subclass (thanks Mark Dickinson).
Added a bit of testing for this.
|
|
|
|
|
|
|
| |
to a bool). Also second argument to watchexp is now converted
to Decimal, just as with all the other two-argument operations.
Thanks Mark Dickinson.
|
|
|
|
|
|
|
| |
fully updated to the latests Decimal Specification (v1.66) and the
latests test cases (v2.56).
Thanks to Mark Dickinson for all his help during this process.
|
|
|
|
| |
better error message, more descriptive. (bug #1770009)
|
|
|
|
| |
You might want to review this change as it's my first time. Be gentle. :-)
|
|
|
|
|
| |
Exceptions now are raised in the new style. And a mockup class is
now also new style. Thanks Santiago Pereson.
|
| |
|
| |
|
|
|
|
| |
decimal.localcontext()
|
|
|
|
| |
module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5)
|
|
|
|
|
| |
r50697: Comments and docs cleanups, and some little fixes
per recommendation from Raymond Hettinger.
|
| |
|
|
|
|
| |
Peresón
|
| |
|
|
|
|
| |
of all remaining references to context objects that I could find. Without a __context__() method context objects no longer exist. Also get test_with working again, and adopt a suggestion from Neal for decimal.Context.get_manager()
|
|
|
|
|
|
|
|
| |
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
|