Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8591563

Browse files
committed
whatsnew: audioop accepts any bytes-like, rejects strings.
1 parent 6c50101 commit 8591563

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

Doc/library/audioop.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ integers, unless specified otherwise.
1212

1313
.. versionchanged:: 3.4
1414
Support for 24-bit samples was added.
15-
16-
.. versionchanged:: 3.4
17-
Any :term:`bytes-like object`\ s are now accepted by all functions in this
18-
module. Strings no more supported.
15+
All functions now accept any :term:`bytes-like object`.
16+
String input now results in an immediate error.
1917

2018
.. index::
2119
single: Intel/DVI ADPCM

Doc/whatsnew/3.4.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,16 @@ by Lucas Maystre in :issue:`11175`.)
554554
audioop
555555
-------
556556

557-
The module now supports 24-bit samples. (Contributed by Serhiy Storchaka
557+
:mod:`audioop` now supports 24-bit samples. (Contributed by Serhiy Storchaka
558558
in :issue:`12866`.)
559559

560560
Added the :func:`~audioop.byteswap` function to convert big-endian samples
561561
to little-endian and vice versa (:issue:`19641`).
562562

563+
All :mod:`audioop` functions now accept any :term:`bytes-like object`. Strings
564+
are not accepted: they didn't work before, now they raise an error right away.
565+
(Contributed by Serhiy Storchaka in :issue:`16685`.)
566+
563567

564568
base64
565569
------
@@ -2050,6 +2054,9 @@ Changes in the Python API
20502054
matched the input type, so if your code was depending on the return value
20512055
being, say, a ``bytearray``, you will need to change your code.
20522056

2057+
* :mod:`audioop` functions now raise an error immediately if passed string
2058+
input, instead of failing randomly later on (:issue:`16685`).
2059+
20532060

20542061
Changes in the C API
20552062
--------------------

0 commit comments

Comments
 (0)