Commit Graph

38957 Commits

Author SHA1 Message Date
Mark Dickinson d4d95f8eac Merged revisions 71832 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71832 | mark.dickinson | 2009-04-24 14:56:07 +0100 (Fri, 24 Apr 2009) | 3 lines

  Issue #5812: The two-argument form of the Fraction constructor
  now accepts arbitrary Rational instances.
........
2009-04-24 14:06:19 +00:00
Mark Dickinson f21bd3cc2f Blocked revisions 71827 via svnmerge
........
  r71827 | mark.dickinson | 2009-04-24 14:14:07 +0100 (Fri, 24 Apr 2009) | 2 lines

  Fix missing 'return NULL'
........
2009-04-24 13:26:14 +00:00
Mark Dickinson 6649fa42f8 Make sure that complex parsing code and corresponding tests
match for 2.7 and 3.1, and that 3.1 continues to
accept complex('j') and complex('4-j')
2009-04-24 13:25:20 +00:00
Mark Dickinson c00b5ef06e Blocked revisions 71824 via svnmerge
........
  r71824 | mark.dickinson | 2009-04-24 13:46:53 +0100 (Fri, 24 Apr 2009) | 7 lines

  Issue #5816:
   - simplify parsing and printing of complex numbers
   - make complex(repr(z)) round-tripping work for complex
     numbers involving nans, infs, or negative zeros
   - don't accept some of the stranger complex strings
     that were previously allowed---e.g., complex('1..1j')
........
2009-04-24 12:53:02 +00:00
Raymond Hettinger 8bd1d4f52c Update for the new float.__repr__() 2009-04-24 03:09:06 +00:00
Raymond Hettinger d258d1e7e8 Update decimal docs for the new floating point repr(). 2009-04-23 22:06:12 +00:00
Mark Dickinson 4a16e3a764 Fix int/long confusion in Misc/NEWS entry. 2009-04-23 19:15:48 +00:00
Mark Dickinson ad476dab09 Issue #5816: Simplify code for parsing and printing of complex numbers.
nans and infs are no longer given special treatment; as a result,
repr(complex(z)) recovers z for any complex number z.
2009-04-23 19:14:16 +00:00
Mark Dickinson f16e71d889 Blocked revisions 71808 via svnmerge
........
  r71808 | mark.dickinson | 2009-04-22 19:15:25 +0100 (Wed, 22 Apr 2009) | 2 lines

  Issue #5812: make Fraction('1e-6') valid.  Backport of r71806.
........
2009-04-22 18:17:29 +00:00
Mark Dickinson cf63f2fb88 Issue #5812: Make Fraction('1e6') valid. The Fraction constructor now
accepts all strings accepted by the float and Decimal constructors,
with the exception of strings representing NaNs or infinities.
2009-04-22 17:50:21 +00:00
Eric Smith 937491d1a9 Merged revisions 71802 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71802 | eric.smith | 2009-04-22 12:20:47 -0400 (Wed, 22 Apr 2009) | 1 line

  Fixed issue 5782: formatting with commas didn't work if no specifier type code was given.
........
2009-04-22 17:04:27 +00:00
Nick Coghlan 4738470402 Merged revisions 71799 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71799 | nick.coghlan | 2009-04-23 01:26:04 +1000 (Thu, 23 Apr 2009) | 1 line

  Issue 5354: Change API for import_fresh_module() to better support test_warnings use case (also fixes some bugs in the original implementation)
........
2009-04-22 16:13:36 +00:00
Eric Smith ae9b6ad91e Blocked revisions 71796 via svnmerge
........
  r71796 | eric.smith | 2009-04-22 09:29:05 -0400 (Wed, 22 Apr 2009) | 20 lines

  Backport of some of the work in r71665 to trunk. This reworks much of
  int, long, and float __format__(), and it keeps their implementation
  in sync with py3k.

  Also added PyOS_double_to_string. This is the "fallback" version
  that's also available in trunk, and should be kept in sync with that
  code. I'll add an issue to document PyOS_double_to_string in the C
  API.

  There are many internal cleanups. Externally visible changes include:

  - Implement PEP 378, Format Specifier for Thousands Separator, for
    floats, ints, and longs.

  - Issue #5515: 'n' formatting for ints, longs, and floats handles
    leading zero formatting poorly.

  - Issue #5772: For float.__format__, don't add a trailing ".0" if
    we're using no type code and we have an exponent.
........
2009-04-22 13:30:56 +00:00
R. David Murray eb3615d9f6 Merged revisions 71785 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71785 | r.david.murray | 2009-04-21 09:06:04 -0400 (Tue, 21 Apr 2009) | 4 lines

  Restore skips of posix and pty tests on Windows by calling the
  test_support.import_module on the appropriate modules
  before any other imports.
........
2009-04-22 02:24:39 +00:00
Eric Smith c4cae32683 Merged revisions 71788 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71788 | eric.smith | 2009-04-21 20:47:00 -0400 (Tue, 21 Apr 2009) | 1 line

  Documentation for issue 5237, auto-numbered format fields. Contributed by Terry J. Reedy.
........
2009-04-22 00:53:01 +00:00
Eric Smith b1a03cf716 Added handling of PyOS_double_to_string out-of-memory errors. Closes issue 5775. 2009-04-21 11:57:38 +00:00
Raymond Hettinger 960dc3626a Update links and version info. 2009-04-21 03:43:15 +00:00
Raymond Hettinger 9b8d069b31 Forward port r70471: Add object_pairs_hook. Issue 5381. 2009-04-21 03:27:12 +00:00
Raymond Hettinger 0ad98d8509 Forward port r70471: Add object_pairs_hook. Issue 5381. 2009-04-21 03:09:17 +00:00
Mark Dickinson e5925773ba Blocked revisions 71776 via svnmerge
........
  r71776 | mark.dickinson | 2009-04-20 22:41:04 +0100 (Mon, 20 Apr 2009) | 2 lines

  Nit: integer division should use //, not /
........
2009-04-20 21:42:04 +00:00
Mark Dickinson c630039edd Merged revisions 71772 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71772 | mark.dickinson | 2009-04-20 22:13:33 +0100 (Mon, 20 Apr 2009) | 5 lines

  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.
........
2009-04-20 21:38:00 +00:00
Tarek Ziadé 628fbd59ea Merged revisions 71766 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71766 | tarek.ziade | 2009-04-20 16:29:42 +0200 (Mon, 20 Apr 2009) | 1 line

  adding a NEWS note for #5795 (previously checked via the buildbot)
........
2009-04-20 14:33:15 +00:00
Tarek Ziadé fbd7757b4b Merged revisions 71759 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71759 | tarek.ziade | 2009-04-20 12:33:47 +0200 (Mon, 20 Apr 2009) | 1 line

  making BuildWinInstTestCase silent in case bdist_wininst is not run under win32
........
2009-04-20 12:37:58 +00:00
Tarek Ziadé 7d3a62629f Merged revisions 71758 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71758 | tarek.ziade | 2009-04-20 09:53:55 +0200 (Mon, 20 Apr 2009) | 1 line

  #5795 sysconfig._config_vars was shadowed in tearDown
........
2009-04-20 12:18:08 +00:00
Benjamin Peterson fd838e6c84 Merged revisions 71734,71738-71739 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71734 | benjamin.peterson | 2009-04-18 17:15:26 -0500 (Sat, 18 Apr 2009) | 1 line

  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

  make errors consistent
........
2009-04-20 02:09:13 +00:00
Mark Dickinson ea835e7a87 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.
2009-04-19 20:40:33 +00:00
Mark Dickinson 769ba47bb2 Merged revisions 71750 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71750 | mark.dickinson | 2009-04-19 18:10:47 +0100 (Sun, 19 Apr 2009) | 3 lines

  Automatic conversion of floats to integers for struct.pack integer codes
  is deprecated.  Use an explicit int() instead.
........
2009-04-19 17:14:11 +00:00
Mark Dickinson a4262b93eb 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.
2009-04-19 11:35:55 +00:00
Ronald Oussoren 1cc369ca86 Merged revisions 71743 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71743 | ronald.oussoren | 2009-04-19 12:38:20 +0200 (Sun, 19 Apr 2009) | 2 lines

  Fix for issue5657.
........
2009-04-19 10:40:48 +00:00
Benjamin Peterson 1fea321502 use NULL for the ends of tables 2009-04-19 03:15:20 +00:00
Benjamin Peterson cee5663068 make python3 alias in altbininstall 2009-04-19 03:14:50 +00:00
Antoine Pitrou c50cb8e9c1 Fix use of test skipping API. 2009-04-19 00:10:36 +00:00
Antoine Pitrou cf4c749680 Issue #5734: BufferedRWPair was poorly tested and had several glaring bugs.
Patch by Brian Quinlan.
2009-04-19 00:09:36 +00:00
Benjamin Peterson 561f36068f Blocked revisions 71725 via svnmerge
........
  r71725 | benjamin.peterson | 2009-04-18 15:25:25 -0500 (Sat, 18 Apr 2009) | 1 line

  initalize -> initialize
........
2009-04-18 21:24:33 +00:00
Mark Dickinson 1068307fd8 Move configure check for broken sem_getvalue outside the
LIBS="$LIBS $LIBM" section.
2009-04-18 21:18:19 +00:00
Benjamin Peterson ae937c021d Merged revisions 71722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71722 | benjamin.peterson | 2009-04-18 15:12:47 -0500 (Sat, 18 Apr 2009) | 1 line

  try to initalize all builtin types with PyType_Ready to avoid problems like #5787
........
2009-04-18 20:54:08 +00:00
Mark Dickinson 332424777f Revert accidental changes to Objects/floatobject.c 2009-04-18 20:19:17 +00:00
Mark Dickinson 7abf8d4066 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.
2009-04-18 20:17:52 +00:00
Benjamin Peterson 153c70f6d7 Merged revisions 71719 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71719 | benjamin.peterson | 2009-04-18 10:31:34 -0500 (Sat, 18 Apr 2009) | 1 line

  rename internal bytes_ functions to bytearray
........
2009-04-18 15:42:12 +00:00
Benjamin Peterson 80688efd6c rename internal methods of the bytes object to bytes_ 2009-04-18 15:17:02 +00:00
Mark Dickinson 97a0a6e13e Blocked revisions 71715 via svnmerge
........
  r71715 | mark.dickinson | 2009-04-18 15:59:42 +0100 (Sat, 18 Apr 2009) | 2 lines

  Issue #1869: Fix a couple of minor round() issues.
........
2009-04-18 15:01:12 +00:00
Benjamin Peterson 20c3b55622 use the more offical skipping api 2009-04-18 14:49:19 +00:00
Benjamin Peterson 9990e8c264 add annotations to open() 2009-04-18 14:47:50 +00:00
Mark Dickinson 67d28f774d Blocked revisions 71710 via svnmerge
........
  r71710 | mark.dickinson | 2009-04-18 15:41:37 +0100 (Sat, 18 Apr 2009) | 2 lines

  Backport r71704 (add configure check for C99 round function) to trunk.
........
2009-04-18 14:42:41 +00:00
Mark Dickinson 23b6286e8f Merged revisions 71705 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71705 | mark.dickinson | 2009-04-18 15:13:43 +0100 (Sat, 18 Apr 2009) | 2 lines

  copysign shouldn't be declared as static in pymath.c
........
2009-04-18 14:14:48 +00:00
Mark Dickinson f253786a80 Add check for C99 round function to configure, and define
a fallback function if round doesn't exist.
2009-04-18 13:58:18 +00:00
Hirokazu Yamamoto f498113f3f Added Python/dtoa.c to project files. 2009-04-18 13:10:51 +00:00
Mark Dickinson e6a076d86c 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.
2009-04-18 11:48:33 +00:00
Mark Dickinson 60fd0999cc Issue #5781: Only use legacy string<->double conversions when
we can't figure out how to get and set the x87 control word.
2009-04-18 10:16:35 +00:00
Mark Dickinson 3800d15772 The comments at the top of intobject.h say that it will be removed in 3.1.
Make it so.
2009-04-18 10:12:16 +00:00