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-60729: Add IEEE format wave audio support take two by mbeijen · Pull Request #145931 · python/cpython

Conversation

@mbeijen

@mbeijen mbeijen commented Mar 13, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This is an updated version of #102574, the original PR where @lkoenig added support for IEEE Wave Audio.

As requested by @encukou

I've

  • Renamed the new 'getencoding/setencoding' to 'getformat/setformat' - format is the term used in the specifications
  • Added format to getparams
  • Added FACT chunk to written non-PCM wave files, which is required by the spec (and is what Audacity does)
  • Added documentation!

Closes: #102574

This is the new version of #145384 which got merged today AND reverted, because it failed on big-endian. Looking back I changed the test so it has the same structure as all other tests in test_wave.py and I ran it on an s390 docker image and tests are passing now for me. I was surprised there were no big endian tests on PRs only on main!! I'm sorry for the churn this caused.


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

  • Issue: wave file module does not support 32bit float format #60729

Sorry, something went wrong.

Uh oh!

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

All reactions
lkoenig and others added 13 commits March 13, 2026 18:56
@lkoenig @mbeijen
Add support for floating point wave files.
bb8e258
This adds support for floating point wav files and fix python#60729.
@mbeijen
wave: rename encoding API to format
164e89e
'format' is the term used in the wave audio specification
@mbeijen
wave: write FACT chunk for IEEE float
33fc496
Per the RIFF/WAVE Rev. 3 documentation, non-PCM formats require a fact chunk, while PCM does not.
This is also what libsdnfile/audacity do

Reference: https://mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html (see the 'fact Chunk' section and linked Rev. 3 RIFF docs).
@mbeijen
wave: add format to getparams
58339ae
@mbeijen
wave: add documentation on IEEE support, format API
4ce4379
@mbeijen
wave: add documentation for undocumented methods
b5569a9
These methods are public but were previously not documented. This caused
the unit tests to fail when I mentioned changes to getparams() in the
whats new ;-)
@mbeijen @aisk
Update Misc/NEWS.d/next/Library/2023-03-10-13-10-06.gh-issue-60729.KC…
fd1d972
…CHTe.rst

Co-authored-by: AN Long <[email protected]>
@mbeijen @encukou
versionchanged
d65a428
Co-authored-by: Petr Viktorin <[email protected]>
@mbeijen
wave: restore getparams() backward compatibility
3c1275e
@mbeijen
wave: export WAVE_FORMAT constants
6f86098
@mbeijen
wave docs: add format constants as data
7663237
@mbeijen
wave: sampwidth for IEEE Float must be 4 or 8
5de8957
This is also similar to what libsndfile does
@mbeijen
test_wave: fix IEEE float test data for big-endian systems
6247ace
Store the WaveIeeeFloatingPointTest frames data in big-endian
byte order with a conditional byteswap for little-endian systems,
matching the pattern used by all other PCM test classes.

This fixes test_read and test_read_not_from_start failures on
big-endian platforms (e.g. s390x).
@mbeijen
mbeijen requested a review from AA-Turner as a code owner March 13, 2026 21:27
@bedevere-app bedevere-app Bot added the awaiting review label Mar 13, 2026
@mbeijen mbeijen changed the title Gh 60729 add ieee wave audio support take 2 GH-60729: Add IEEE format wave audio support take two Mar 13, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 13, 2026
wave file module does not support 32bit float format #60729
Closed
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 17, 2026
@bedevere-bot

bedevere-bot commented Mar 17, 2026

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit 6247ace 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145931%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 17, 2026
encukou
encukou approved these changes Mar 17, 2026
View reviewed changes

@encukou encukou 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.

Thank you!
I'll run the buildbot tests this time. (Don't worry if some fail; there are some flaky ones in this set.)

I was surprised there were no big endian tests on PRs only on main!! I'm sorry for the churn this caused.

I should be apologizing here, for not catching this!
Yeah, we don't get that many issues around endianness; the s390x tests run after merge.

Normally I'd have looked into the issue and sent a fix, but I only noticed the failures as I was leaving for the weekend and wanted the tests to be green the next few days. Sorry you got caught in the churn!

Sorry, something went wrong.

Uh oh!

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

mbeijen reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Mar 17, 2026
@encukou
Merge branch 'main' into pythonGH-60729-add-ieee-wave-audio-support-t…
27c0ddb
…ake-2
@encukou
encukou enabled auto-merge (squash) March 18, 2026 12:21
@encukou
encukou merged commit d42a04c into python:main Mar 18, 2026
47 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Mar 18, 2026
@encukou

encukou commented Mar 18, 2026

Copy link
Copy Markdown
Member

(Don't worry if some fail; there are some flaky ones in this set.)

(For the record, the failure is due to a clang bug...)

All reactions

Sorry, something went wrong.

Uh oh!

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

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@mbeijen @lkoenig @ljfp
pythonGH-60729: Add IEEE format wave audio support (pythonGH-145931)
aa3aa81
(this re-applies reverted commit 61f2a1a,
with a test fix)

Co-authored-by: Lionel Koenig <[email protected]>
@bdieterm bdieterm mentioned this pull request Oct 17, 2026
gh-60729: Add missing versionadded/versionchanged tags to wave module #159644
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner 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.

4 participants

@mbeijen @bedevere-bot @encukou @lkoenig
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.