Benjamin Peterson
565d78586b
normalize exceptions passed to the __exit__ method #7853
...
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Victor Stinner
b4b0a2935d
Issue #7819 : Check sys.call_tracing() arguments types.
...
py3k was already patched by issue #3661 .
2010-01-31 22:32:15 +00:00
Eric Smith
ee931b7253
Issue #7766 : Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type.
2010-01-27 00:28:29 +00:00
Mark Dickinson
8cd0a66a0f
dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormals that are also halfway cases.
2010-01-23 21:25:53 +00:00
Mark Dickinson
fc5290458d
Issue #7743 : Add checks for zero inputs to the lshift and mult functions;
...
this fixes the first bug described in issue #7743 .
2010-01-23 20:48:56 +00:00
Mark Dickinson
adcda3400f
Issue #7743 : Fix a potential incorrect rounding bug in dtoa.c (2nd bug
...
in issue 7743).
2010-01-22 17:04:07 +00:00
Mark Dickinson
86db34207c
Correct typo in comment.
2010-01-22 16:18:09 +00:00
Mark Dickinson
ca6ea56718
Additional explanatory comments for _Py_dg_strtod.
2010-01-20 21:23:25 +00:00
Mark Dickinson
1942806013
Don't try to put a value into a NULL pointer.
2010-01-20 18:02:41 +00:00
Mark Dickinson
4141d65fb7
Various dtoa.c cleanups. 1. Despagghetify _Py_dg_strtod parsing code
...
and exit points. 2. Simplify bigcomp comparison loop. 3. Don't set
ERANGE on _Py_dg_strtod underflow (it was set inconsistently anyway).
4. Remove unused dsign field from BCinfo struct.
2010-01-20 17:36:31 +00:00
Mark Dickinson
9481c576cd
Issue #7632 : When Py_USING_MEMORY_DEBUGGER is defined, disable the
...
private memory allocation scheme in dtoa.c, along with a piece of code
that caches powers of 5 for future use. This makes it easier to
detect dtoa.c memory leaks with Valgrind or similar tools.
Patch by Stefan Krah.
2010-01-17 20:57:56 +00:00
Mark Dickinson
23df3d270d
Issue #7632 : Fix a memory leak in _Py_dg_strtod.
2010-01-17 13:37:57 +00:00
Mark Dickinson
18a818bc63
Fix multiple uses of variable 'L' in _Py_dg_strtod, where one use requires an unsigned long and the other a signed long. See also r77421.
2010-01-16 18:06:17 +00:00
Mark Dickinson
811ff822f8
Issue #7632 : Fix one more case of incorrect rounding for str -> float
...
conversion (see bug 5 in the issue tracker).
2010-01-16 17:57:49 +00:00
Mark Dickinson
476279f18b
Issue #7632 : Fix a serious wrong output bug for string -> float conversion.
...
Also remove some now unused variables, and add comments clarifying the
possible outputs of the parsing section of _Py_dg_strtod. Thanks
Eric Smith for reviewing.
2010-01-16 10:44:00 +00:00
Brett Cannon
0bc77474aa
Remove C++/C99-style comments.
2010-01-15 01:31:45 +00:00
Brett Cannon
3ffa43db48
The silencing of DeprecationWarning was not taking -3 into consideration. Since
...
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.
Closes issue #7700 . Thanks Ezio Melotti and Florent Xicluna for patch help.
2010-01-14 20:00:28 +00:00
Mark Dickinson
f8747c1f12
Issue 7632: fix incorrect rounding for long input strings with values very close to a power of 2. (See Bug 4 in the tracker discussion.)
2010-01-14 14:40:20 +00:00
Mark Dickinson
50b60c612e
Issue 7632: fix a dtoa.c bug (bug 6) causing incorrect rounding. Tests to follow.
2010-01-14 13:14:49 +00:00
Mark Dickinson
03774fac62
Fix off-by-one error introduced in r77483. I have a test for this, but it currently fails due to a different dtoa.c bug; I'll add the test once that bug is fixed.
2010-01-14 13:02:36 +00:00
Mark Dickinson
d2a9940acb
More dtoa.c cleanup; remove the need for bc.dplen, bc.dp0 and bc.dp1.
2010-01-13 22:20:10 +00:00
Mark Dickinson
02139d74ba
Fix buggy comparison: LHS of comparison was being treated as unsigned.
2010-01-13 22:15:53 +00:00
Mark Dickinson
6e0d3d67fb
Simplify and annotate the bigcomp function, removing unused special cases.
2010-01-13 20:55:03 +00:00
Mark Dickinson
5818e01253
Clarify that sulp expects a nonnegative input, but that +0.0 is fine.
2010-01-13 19:02:37 +00:00
Mark Dickinson
b26d56ac18
Add comments explaining the role of the bigcomp function in dtoa.c.
2010-01-13 18:21:53 +00:00