[Python-checkins] r72103 - in python/branches/release26-maint: Lib/aifc.py Lib/test/Sine-1000Hz-300ms.aif Lib/test/test_aifc.py Lib/test/test_sundry.py Misc/ACKS Misc/NEWS
r.david.murray
python-checkins at python.org
Wed Apr 29 16:54:29 CEST 2009
Author: r.david.murray
Date: Wed Apr 29 16:54:29 2009
New Revision: 72103
Log:
Merged revisions 72100-72101 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72100 | r.david.murray | 2009-04-29 09:17:37 -0400 (Wed, 29 Apr 2009) | 7 lines
Fix issue 2245. aifc now skips any chunk type it doesn't actually
process instead of throwing errors for anything not in an explicit
skip list. This is per this spec: http://www.cnpbagwell.com/aiff-c.txt.
Spec reference and test sound file provided by Santiago Peresón, fix
based on patch by Hiroaki Kawai.
........
r72101 | r.david.murray | 2009-04-29 09:51:44 -0400 (Wed, 29 Apr 2009) | 2 lines
Now that we've got a test_aifc, add a few tests.
........
Added:
python/branches/release26-maint/Lib/test/Sine-1000Hz-300ms.aif
- copied unchanged from r72101, /python/trunk/Lib/test/Sine-1000Hz-300ms.aif
python/branches/release26-maint/Lib/test/test_aifc.py
- copied unchanged from r72101, /python/trunk/Lib/test/test_aifc.py
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/aifc.py
python/branches/release26-maint/Lib/test/test_sundry.py
python/branches/release26-maint/Misc/ACKS
python/branches/release26-maint/Misc/NEWS
Modified: python/branches/release26-maint/Lib/aifc.py
==============================================================================
--- python/branches/release26-maint/Lib/aifc.py (original)
+++ python/branches/release26-maint/Lib/aifc.py Wed Apr 29 16:54:29 2009
@@ -144,9 +144,6 @@
_AIFC_version = 0xA2805140L # Version 1 of AIFF-C
-_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
- 'APPL', 'NAME', 'AUTH', '(c) ', 'ANNO'
-
def _read_long(file):
try:
return struct.unpack('>l', file.read(4))[0]
@@ -314,10 +311,6 @@
self._version = _read_ulong(chunk)
elif chunkname == 'MARK':
self._readmark(chunk)
- elif chunkname in _skiplist:
- pass
- else:
- raise Error, 'unrecognized chunk type '+chunk.chunkname
chunk.skip()
if not self._comm_chunk_read or not self._ssnd_chunk:
raise Error, 'COMM chunk and/or SSND chunk missing'
Modified: python/branches/release26-maint/Lib/test/test_sundry.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_sundry.py (original)
+++ python/branches/release26-maint/Lib/test/test_sundry.py Wed Apr 29 16:54:29 2009
@@ -10,7 +10,6 @@
def test_at_least_import_untested_modules(self):
with warnings.catch_warnings():
import CGIHTTPServer
- import aifc
import audiodev
import bdb
import cgitb
Modified: python/branches/release26-maint/Misc/ACKS
==============================================================================
--- python/branches/release26-maint/Misc/ACKS (original)
+++ python/branches/release26-maint/Misc/ACKS Wed Apr 29 16:54:29 2009
@@ -362,6 +362,7 @@
Peter van Kampen
Jacob Kaplan-Moss
Lou Kates
+Hiroaki Kawai
Sebastien Keim
Robert Kern
Randall Kern
@@ -527,6 +528,7 @@
Samuele Pedroni
Marcel van der Peijl
Steven Pemberton
+Santiago Peresón
Mark Perrego
Trevor Perrin
Tim Peters
Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS (original)
+++ python/branches/release26-maint/Misc/NEWS Wed Apr 29 16:54:29 2009
@@ -27,6 +27,8 @@
Library
-------
+- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.
+
- Issue #4305: ctypes should now build again on mipsel-linux-gnu
- Issue #5853: calling a function of the mimetypes module from several threads
More information about the Python-checkins
mailing list