GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104773: PEP 594: Remove the ossaudiodev module by vstinner · Pull Request #104862 · python/cpython

Conversation

@vstinner

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

Uh oh!

There was an error while loading. Please reload this page.

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.
  • Issue: PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-104773: PEP 594: Remove the ossaudiodev module
c67b46b
* Remove ossaudiodev extension in configure.ac and regenerate
  the configure script.
* Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.
@vstinner
vstinner requested review from corona10 and erlend-aasland as code owners May 24, 2023 12:33
@bedevere-bot bedevere-bot added the awaiting core review label May 24, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 24, 2023
PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773
Closed
19 tasks done
@vstinner
Suggest replacing ossaudiodev with pygame
be37f6f
@vstinner

vstinner commented May 24, 2023

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk reviewed May 24, 2023
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

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=""]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
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.

@hugovk hugovk May 24, 2023

Copy link
Copy Markdown
Member

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/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner May 24, 2023

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Lib/test/test_ossaudiodev.py

@hugovk hugovk May 24, 2023

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner May 24, 2023

Copy link
Copy Markdown
Member Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@vstinner
vstinner merged commit fc07fe4 into python:main May 24, 2023
@vstinner
vstinner deleted the remove_ossaudio branch May 24, 2023 13:00
@bedevere-bot bedevere-bot removed the awaiting core review label May 24, 2023
@vstinner

vstinner commented May 24, 2023

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.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@hugovk hugovk hugovk left review comments
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vstinner @hugovk @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.