summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-03-08 02:35:31 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-03-08 02:35:31 (GMT)
commit8591563628dfca26243ef9bf2dfac11eb0b44e77 (patch)
tree771e308c7f516ca6ff8664c9f223165d7c05d77e
parent6c50101fc90ae5833072a34bd057d0f304cfe334 (diff)
downloadcpython-8591563628dfca26243ef9bf2dfac11eb0b44e77.zip
cpython-8591563628dfca26243ef9bf2dfac11eb0b44e77.tar.gz
cpython-8591563628dfca26243ef9bf2dfac11eb0b44e77.tar.bz2
whatsnew: audioop accepts any bytes-like, rejects strings.
-rw-r--r--Doc/library/audioop.rst6
-rw-r--r--Doc/whatsnew/3.4.rst9
2 files changed, 10 insertions, 5 deletions
diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst
index fbb7fc6..faf9916 100644
--- a/Doc/library/audioop.rst
+++ b/Doc/library/audioop.rst
@@ -12,10 +12,8 @@ integers, unless specified otherwise.
.. versionchanged:: 3.4
Support for 24-bit samples was added.
-
-.. versionchanged:: 3.4
- Any :term:`bytes-like object`\ s are now accepted by all functions in this
- module. Strings no more supported.
+ All functions now accept any :term:`bytes-like object`.
+ String input now results in an immediate error.
.. index::
single: Intel/DVI ADPCM
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index d23c3e2..b193054 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -554,12 +554,16 @@ by Lucas Maystre in :issue:`11175`.)
audioop
-------
-The module now supports 24-bit samples. (Contributed by Serhiy Storchaka
+:mod:`audioop` now supports 24-bit samples. (Contributed by Serhiy Storchaka
in :issue:`12866`.)
Added the :func:`~audioop.byteswap` function to convert big-endian samples
to little-endian and vice versa (:issue:`19641`).
+All :mod:`audioop` functions now accept any :term:`bytes-like object`. Strings
+are not accepted: they didn't work before, now they raise an error right away.
+(Contributed by Serhiy Storchaka in :issue:`16685`.)
+
base64
------
@@ -2050,6 +2054,9 @@ Changes in the Python API
matched the input type, so if your code was depending on the return value
being, say, a ``bytearray``, you will need to change your code.
+* :mod:`audioop` functions now raise an error immediately if passed string
+ input, instead of failing randomly later on (:issue:`16685`).
+
Changes in the C API
--------------------