Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 2 commits intopython:mainfromvstinner:remove_ossaudio
May 24, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 24, 2023
edited by github-actionsbot
Loading

  • 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.
@vstinner
Copy link
MemberAuthor

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

Seenltk/corpus/reader/timit.py. This code tries ossaudiodev but catches properly ImportError and usespygame 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).

Copy link
Member

@hugovkhugovk left a 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?

configure13492:    OSSAUDIODEV_LIBS="-lossaudio" ;; #(13494:    OSSAUDIODEV_LIBS=""configure.ac3921:  [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.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
MemberAuthor

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.

hugovk reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Can we also deleteLib/test/audiotest.au?

Copy link
MemberAuthor

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.

hugovk reacted with thumbs up emoji
@vstinnervstinner merged commitfc07fe4 intopython:mainMay 24, 2023
@vstinnervstinner deleted the remove_ossaudio branchMay 24, 2023 13:00
@vstinner
Copy link
MemberAuthor

Can these bits also be deleted? [OSSAUDIODEV_LIBS]

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

hugovk reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk left review comments

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@hugovk@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp