Issue #3166: Make long -> float (and int -> float) conversions
correctly rounded, using round-half-to-even. This ensures that the
value of float(n) doesn't depend on whether we're using 15-bit digits
or 30-bit digits for Python longs.
........
many more types to initialize (I had to expose some of them)
........
r71738 | benjamin.peterson | 2009-04-18 21:32:42 -0500 (Sat, 18 Apr 2009) | 1 line
initialize weakref some weakref types
........
r71739 | benjamin.peterson | 2009-04-18 21:40:43 -0500 (Sat, 18 Apr 2009) | 1 line
Mark Dickinson [Sun, 19 Apr 2009 20:40:33 +0000 (20:40 +0000)]
Issue #5463: Remove deprecated float coercion from struct module, along
with the _PY_STRUCT_FLOAT_COERCE constant. Simplify tests accordingly,
and reenable (now-fixed) broken tests.
Mark Dickinson [Sun, 19 Apr 2009 11:35:55 +0000 (11:35 +0000)]
Add comments to pyport.h explaining how to enable support for short
float repr on platforms that don't currently support it, and
reorganize the defines slightly to make adding support easier.
Mark Dickinson [Sat, 18 Apr 2009 20:17:52 +0000 (20:17 +0000)]
The SSE2 detection and enabling could potentially cause
problems for binary distributions of Python in situations
where the build machine has SSE2 but the target machine
does not.
Therefore, don't enable SSE2 instructions automatically on x86.
Mark Dickinson [Sat, 18 Apr 2009 11:48:33 +0000 (11:48 +0000)]
Issue #1869 (and 4707, 5118, 5473, 1456775): use the new
string <-> float conversion routines to make round(x, n) correctly
rounded for floats x, so that it always agrees with format(x, '.<n>f').
Also fix some other round nuisances, like round(123.456, 1-2**31) giving
an integer rather than a float.
Mark Dickinson [Fri, 17 Apr 2009 20:59:58 +0000 (20:59 +0000)]
Sort out some confusion in test_float.py: the two
separate FormatTestCase classes have been combined,
and test_short_repr has been moved from FormatTestCase
to the existing ReprTestCase.
Eric Smith [Thu, 16 Apr 2009 20:16:10 +0000 (20:16 +0000)]
The other half of Issue #1580: use short float repr where possible.
Addresses the float -> string conversion, using David Gay's code which
was added in Mark Dickinson's checkin r71663.
Also addresses these, which are intertwined with the short repr
changes:
- Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'
- Issue #5515: 'n' formatting with commas no longer works poorly
with leading zeros.
- PEP 378 Format Specifier for Thousands Separator: implemented
for floats.
Mark Dickinson [Thu, 16 Apr 2009 19:52:09 +0000 (19:52 +0000)]
Issue #1580: use short float repr where possible.
- incorporate and adapt David Gay's dtoa and strtod
into the Python core
- on platforms where we can use Gay's code (almost
all!), repr(float) is based on the shortest
sequence of decimal digits that rounds correctly.
- add sys.float_repr_style attribute to indicate
whether we're using Gay's code or not
- add autoconf magic to detect and enable SSE2
instructions on x86/gcc
- slight change to repr and str: repr switches
to exponential notation at 1e16 instead of
1e17, str switches at 1e11 instead of 1e12
Fix for issue3440: add warning to subprocess discussion of
env parameter that on Windows SystemRoot is required in order
to run side-by-side assemblies.
........
http://bugs.python.org/issue5623
Dynamically discoverd the size of the ioinfo struct used by the crt for its file descriptors. This should work across all flavors of the CRT. Thanks to Amaury Forgeot d'Arc
Needs porting to 3.1
........
Adjust test_asyncore to account for intentional asyncore behavior change
introduced by r70934 that was causing a test failure when run under -O.
........
Made handle_expt_event() be called last, so that we don't accidentally read
after closing the socket.
........
r70934 | josiah.carlson | 2009-03-31 21:28:11 -0400 (Tue, 31 Mar 2009) | 2 lines
In PyErr_GivenExceptionMatches, temporarily bump the recursion
limit, so that in the most common case PyObject_IsSubclass will
not raise a recursion error we have to ignore anyway.
........
r71058 | georg.brandl | 2009-04-02 20:09:04 +0200 (Do, 02 Apr 2009) | 3 lines
PyErr_NormalizeException may not set an error, so convert the PyErr_SetObject
call on hitting the recursion limit into just assigning it to the arguments provided.
........
Merged revisions 70912,70944,70968,71033,71041,71208,71263,71286,71395-71396,71405-71406,71485,71492,71494 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70912 | georg.brandl | 2009-03-31 17:35:46 -0500 (Tue, 31 Mar 2009) | 1 line
#5617: add a handy function to print a unicode string to gdbinit.
........
r70944 | georg.brandl | 2009-03-31 23:32:39 -0500 (Tue, 31 Mar 2009) | 1 line
#5631: add upload to list of possible commands, which is presented in --help-commands.
........
r70968 | michael.foord | 2009-04-01 13:25:38 -0500 (Wed, 01 Apr 2009) | 1 line
Fix two issues introduced by issue #71031 by changing the signature of
PyImport_AppendInittab() to take a const char *.
........
r71041 | jesse.noller | 2009-04-02 00:17:26 -0500 (Thu, 02 Apr 2009) | 1 line
Change the way unittest.TestSuite use their tests to always access them through iteration. Non behavior changing, this allows you to create custom subclasses that override __iter__.
Fix for issue5040. Adding test for Content-Length
........
r71029 | senthil.kumaran | 2009-04-01 22:00:34 -0500 (Wed, 01 Apr 2009) | 3 lines
Fixing the issue4860. Escaping embedded '"' character in js_output() method of Morsel.
........
r71031 | brett.cannon | 2009-04-01 22:17:39 -0500 (Wed, 01 Apr 2009) | 6 lines
PyImport_AppendInittab() took a char * as a first argument even though that
string was stored beyond the life of the call. Changed the signature to be
const char * to help make this point.
- Issue #2254: Fix CGIHTTPServer information disclosure. Relative paths are
now collapsed within the url properly before looking in cgi_directories.
........
Merged revisions 70980,71059,71225,71234,71241,71243,71249,71251,71255,71266,71299,71329,71397-71398,71486 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
bounds check arguments to mmap.move(). All of them. Really.
fixes crasher on OS X 10.5
........
r71059 | mark.dickinson | 2009-04-02 13:39:37 -0500 (Thu, 02 Apr 2009) | 2 lines
sys.long_info attributes should be ints, not longs
........
r71225 | georg.brandl | 2009-04-05 06:54:07 -0500 (Sun, 05 Apr 2009) | 1 line
#5580: no need to use parentheses when converterr() argument is actually a type description.
........
r71234 | georg.brandl | 2009-04-05 08:16:35 -0500 (Sun, 05 Apr 2009) | 1 line
#5471: fix expanduser() for $HOME set to "/".
........
r71243 | georg.brandl | 2009-04-05 10:14:29 -0500 (Sun, 05 Apr 2009) | 1 line
#5432: make plistlib docstring a raw string, since it contains examples with backslash escapes.
........
r71249 | georg.brandl | 2009-04-05 11:30:43 -0500 (Sun, 05 Apr 2009) | 1 line
#5444: adapt make.bat to new htmlhelp output file name.
........
r71251 | georg.brandl | 2009-04-05 12:17:42 -0500 (Sun, 05 Apr 2009) | 1 line
#5298: clarify docs about GIL by using more consistent wording.
........
r71255 | georg.brandl | 2009-04-05 13:34:58 -0500 (Sun, 05 Apr 2009) | 1 line
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.
........
r71266 | georg.brandl | 2009-04-05 15:23:13 -0500 (Sun, 05 Apr 2009) | 1 line
Fixes issue5705: os.setuid() and friends did not accept the same range of
values that pwd.getpwnam() returns.
........
r71329 | benjamin.peterson | 2009-04-06 16:53:33 -0500 (Mon, 06 Apr 2009) | 1 line
add create_connection to __all__ #5711
........
r71397 | georg.brandl | 2009-04-08 11:36:39 -0500 (Wed, 08 Apr 2009) | 1 line
Blocked revisions 70807,70986,70993-70994,71127,71300,71302,71361,71365,71367,71370,71377,71380,71385,71389,71392,71419,71430,71435,71448,71462,71490 via svnmerge
fix since difference formating of SyntaxErrors
........
r71367 | benjamin.peterson | 2009-04-07 11:03:04 -0500 (Tue, 07 Apr 2009) | 1 line
revert unrelated change to test_telnetlib
........
r71370 | vinay.sajip | 2009-04-07 12:18:24 -0500 (Tue, 07 Apr 2009) | 1 line
Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and as implemented in the Py3K branch.
........
r71377 | jack.diederich | 2009-04-07 15:22:59 -0500 (Tue, 07 Apr 2009) | 1 line
eliminate more race conditions in telnetlib tests
........
r71380 | raymond.hettinger | 2009-04-07 16:43:51 -0500 (Tue, 07 Apr 2009) | 1 line
- Make timing assertions very generous (a la test_timeout.py)
- Break the gc cycle in negotiation tests
- test the different guarantees of read_lazy and read_very_lazy
........
r71389 | raymond.hettinger | 2009-04-08 00:39:38 -0500 (Wed, 08 Apr 2009) | 1 line
Issue 5354: Provide a standardised testing mechanism for doing fresh imports of modules, including the ability to block extension modules in order to test the pure Python fallbacks
........