diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-01-01 17:27:30 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-01-01 17:27:30 (GMT) |
commit | 1b34d2552c2cb2369130291a8a9ae973753b4072 (patch) | |
tree | 5bfcf8b49745280e0a92a49ef2102d81c3674b68 /Misc | |
parent | edfe72f66fd789d65b0c7125540c08d3e98a901e (diff) | |
download | cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.zip cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.tar.gz cpython-1b34d2552c2cb2369130291a8a9ae973753b4072.tar.bz2 |
Issue #5080: turn the DeprecationWarning from float arguments passed
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -12,6 +12,14 @@ What's New in Python 2.7 alpha 2? Core and Builtins ----------------- +- Issue #5080: A number of functions and methods previously produced a + DeprecationWarning when passed a float argument where an integer was + expected. These functions and methods now raise TypeError instead. + The majority of the effects of this change are in the extension + modules, but some core functions and methods are affected: notably + the 'chr', 'range' and 'xrange' builtins, and many unicode/str + methods. + - Issue #7604: Deleting an unset slotted attribute did not raise an AttributeError. @@ -88,6 +96,14 @@ Library C-API ----- +- Issue #5080: The argument parsing functions PyArg_ParseTuple, + PyArg_ParseTupleAndKeywords, PyArg_VaParse, + PyArg_VaParseTupleAndKeywords and PyArg_Parse no longer accept float + arguments for integer format codes (other than 'L'): previously an + attempt to pass a float resulted in a DeprecationWarning; now it + gives a TypeError. For the 'L' format code (which previously had no + warning) there is now a DeprecationWarning. + - Issue #7033: function ``PyErr_NewExceptionWithDoc()`` added. Build |