This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: wave.Wave_read.getparams should be more user friendly
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Claudiu.Popa, benjamin.peterson, berker.peksag, python-dev, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-03-19 20:59 by Claudiu.Popa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
wave.patch Claudiu.Popa, 2013-03-19 20:59 review
wave_17487.patch Claudiu.Popa, 2013-03-20 07:05 review
wave_with_docs.patch r.david.murray, 2013-03-22 02:44 review
wave_picklable.patch Claudiu.Popa, 2013-05-13 08:57 review
Messages (16)
msg184680 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2013-03-19 20:59
wave.Wave_read/Wave_write.getparams returns a tuple with various info about the wav file, when it could return a namedtuple, that can be manipulated in a richer way. I attached a patch. It doesn't have any tests, mainly because .getparams isn't tested at all in the original
msg184683 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-03-19 21:26
This seems like a reasonable idea to me, thanks for the patch.

Adding tests for getparams would be a good thing ;)
msg184744 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2013-03-20 07:05
Updated the patch with test for .getparams.
msg184899 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-03-21 19:16
Looks good.

Claudio, could you please submit a contributor agreement? (http:://
msg184940 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2013-03-22 02:34
Should the documentation of the wave module be updated to match this change? See issue 16808 for example.

The current wave.Wave_read.getparams documentation says:

"Returns a tuple (nchannels, sampwidth, framerate, nframes, comptype, compname), equivalent to output of the get*() methods."
msg184942 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-03-22 02:44
It should.  Here's the patch I am prepared to commit once Claudio's contributor for confirmation occurs.
msg184947 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2013-03-22 07:15
Hello, I signed the electronic contributor agreement (I received a mail with the final copy afterwards). Is there something else that I should do or that is the entire process?
msg184968 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-03-22 14:38
I backed it out until it can be done without breaking OSX. d174cb3f5b9e
msg184969 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-03-22 14:40
Wrong issue, sorry.
msg184988 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-03-22 17:23
Claudiu: that's the entire process.  Now we just wait a day or two until the confirmation arrives from the PSF that they have accepted it (you'll get an '*' next to your name here in the tracker when that happens).
msg186385 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2013-04-09 06:39
Hello. I received the confirmation for my CLA, could you commit the patch? Thank you!
msg186514 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-10 16:31
New changeset 340a12c18b7f by R David Murray in branch 'default':
#17487: wave.getparams now returns a namedtuple.
msg186515 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-04-10 16:33
Thanks, Claudiu.
msg189110 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2013-05-13 08:57
There is a regression with the latest patch, `getparams` output is no longer picklable. The attached patch fixes this issue. Also, I renamed the internal namedtuple to something more meaningful.
msg196870 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-03 21:43
New changeset a14ec46de0a4 by Serhiy Storchaka in branch 'default':
Issue #17487: The result of the wave getparams method now is pickleable again.
msg196873 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-09-03 22:06
Thank you Claudiu. I have changed _Wave_params to _wave_params for consistency with issue17818 and issue18901.
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61689
2013-09-03 22:06:15serhiy.storchakasetstatus: open -> closed

messages: + msg196873
stage: patch review -> resolved
2013-09-03 21:43:37python-devsetmessages: + msg196870
2013-09-03 20:29:19serhiy.storchakasetassignee: serhiy.storchaka

nosy: + serhiy.storchaka
stage: resolved -> patch review
2013-05-13 08:57:44Claudiu.Popasetstatus: closed -> open
2013-05-13 08:57:09Claudiu.Popasetfiles: + wave_picklable.patch

messages: + msg189110
2013-04-10 16:33:03r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg186515

stage: commit review -> resolved
2013-04-10 16:31:56python-devsetnosy: + python-dev
messages: + msg186514
2013-04-09 06:39:28Claudiu.Popasetmessages: + msg186385
2013-03-22 17:23:43r.david.murraysetmessages: + msg184988
2013-03-22 14:40:19benjamin.petersonsetmessages: + msg184969
2013-03-22 14:38:35benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg184968
2013-03-22 07:15:42Claudiu.Popasetmessages: + msg184947
2013-03-22 02:44:06r.david.murraysetfiles: + wave_with_docs.patch

messages: + msg184942
2013-03-22 02:34:57berker.peksagsetnosy: + berker.peksag
messages: + msg184940
2013-03-21 19:16:44r.david.murraysetmessages: + msg184899
stage: commit review
2013-03-20 07:05:12Claudiu.Popasetfiles: + wave_17487.patch

messages: + msg184744
2013-03-19 21:26:03r.david.murraysetnosy: + r.david.murray

messages: + msg184683
versions: - Python 3.3
2013-03-19 20:59:09Claudiu.Popacreate