Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855626 - dev-python/pyaudio-0.2.11-r1: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats with Python 3.10
Summary: dev-python/pyaudio-0.2.11-r1: SystemError: PY_SSIZE_T_CLEAN macro must be def...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: py310, python3.10-compat
  Show dependency tree
 
Reported: 2022-07-02 04:49 UTC by intrus
Modified: 2022-07-02 13:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the problem (2ee560056e.patch,905 bytes, patch)
2022-07-02 04:49 UTC, intrus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description intrus 2022-07-02 04:49:33 UTC
Created attachment 789395 [details, diff]
Patch to fix the problem

dev-python/pyaudio-0.2.11-r1 throws SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats with Python 3.10

There is an existing patch at git.skeh.site/skeh/pyaudio/commit/2ee560056ec889ea7cd3ce1801b796b0939dd540
That resolve this problem (can be downloaded under the "Diff Options" button)
I have also attached it for convenience.

Here is a sample code highlighting the error:

import pyaudio

p = pyaudio.PyAudio()

def callback(in_data, frame_count, time_info, status):
    return (in_data, pyaudio.paContinue)


stream = p.open(format=pyaudio.paInt16,
                channels = 2,
                rate = 44100,
                frames_per_buffer = 1024,
                input = True,
                stream_callback=callback)

stream.stop_stream() # crash here
stream.close()
Comment 1 Larry the Git Cow gentoo-dev 2022-07-02 13:00:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8718d02e1cad7bfa1dfecc952b6a403ea155c8bc

commit 8718d02e1cad7bfa1dfecc952b6a403ea155c8bc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-02 12:57:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-02 13:00:23 +0000

    dev-python/pyaudio: fix Python 3.10 compatibility
    
    Closes: https://bugs.gentoo.org/855626
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/pyaudio-0.2.11-python310-size_t.patch    | 28 +++++++++++++++
 dev-python/pyaudio/pyaudio-0.2.11-r2.ebuild        | 42 ++++++++++++++++++++++
 2 files changed, 70 insertions(+)