-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-104773: PEP 594: Remove the ossaudiodev module #104862
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
* Remove ossaudiodev extension in configure.ac and regenerate the configure script. * Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.
Using See nltk/corpus/reader/timit.py. This code tries ossaudiodev but catches properly ImportError and uses pygame if the ossaudiodev module is missing. If ossaudiodev and pygame are missing, it displays the error message:
In the What's New In Python 3.13 entry, I suggest replacing ossaudiodev with pygame. IMO pygame is a more portable since it supports multiple audio playback backend depending on the platform, whereas ossaudiodev only supports OSS backend (ex: it doesn't support Windows). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these bits also be deleted?
configure
13492: OSSAUDIODEV_LIBS="-lossaudio" ;; #(
13494: OSSAUDIODEV_LIBS=""
configure.ac
3921: [NetBSD*], [OSSAUDIODEV_LIBS="-lossaudio"],
3922: [OSSAUDIODEV_LIBS=""]
@@ -157,6 +157,10 @@ Removed | |||
use the :mod:`subprocess` module instead. | |||
(Contributed by Victor Stinner in :gh:`104773`.) | |||
|
|||
* :pep:`594`: Remove the :mod:`!ossaudiodev` module, deprecated in Python 3.11: | |||
use the `pygame project <https://www.pygame.org/>`_ for audio playback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we also/instead mention the pygame-ce fork? https://pyga.me
More info: https://www.reddit.com/r/pygame/comments/1112q10/pygame_community_edition_announcement/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to only link to pygame for now. It's unclear to me where the community goes, but so far, "pygame" remains the reference project. I hope that the two communities will merge again. If not, we can update the doc later. The problem is that the Python documentation is not updated frequently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also delete Lib/test/audiotest.au
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My PR #104863 removes it.
I created PR #104864 to remove it. Well spotted, I missed that one. |
📚 Documentation preview 📚: https://cpython-previews--104862.org.readthedocs.build/