FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104773: PEP 594: Remove the ossaudiodev module by vstinner · Pull Request #104862 · python/cpython · GitHub

/ cpython Public

gh-104773: PEP 594: Remove the ossaudiodev module - #104862

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_ossaudio
May 24, 2023
Merged

gh-104773: PEP 594: Remove the ossaudiodev module#104862
vstinner merged 2 commits into
python:mainfrom
vstinner:remove_ossaudio

Conversation

vstinner commented May 24, 2023
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member
  • Remove ossaudiodev extension in configure.ac and regenerate the configure script.
  • Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.

📚 Documentation preview 📚: https://cpython-previews--104862.org.readthedocs.build/

* Remove ossaudiodev extension in configure.ac and regenerate
  the configure script.
* Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.

Copy link
Copy Markdown
Member Author

Using import ossaudiodev|from ossaudiodev regex, I only found a single project in PyPI top 5,000 projects (2023-04-13) using the ossaudiodev: nltk.

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:

you must install pygame or ossaudiodev for audio playback.

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).

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can these bits also be deleted?

configure
13492:    OSSAUDIODEV_LIBS="-lossaudio" ;; #(
13494:    OSSAUDIODEV_LIBS=""

configure.ac
3921:  [NetBSD*], [OSSAUDIODEV_LIBS="-lossaudio"],
3922:  [OSSAUDIODEV_LIBS=""]

Comment thread Doc/whatsnew/3.13.rst
(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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can we also delete Lib/test/audiotest.au?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

My PR #104863 removes it.

vstinner merged commit fc07fe4 into python:main May 24, 2023
vstinner deleted the remove_ossaudio branch May 24, 2023 13:00

Copy link
Copy Markdown
Member Author

Can these bits also be deleted? [OSSAUDIODEV_LIBS]

I created PR #104864 to remove it. Well spotted, I missed that one.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL