Author Oleg.Plakhotnyuk
Recipients Oleg.Plakhotnyuk
Date 2011-11-13.07:34:16
SpamBayes Score 2.0095e-14
Marked as misclassified No
Message-id <>
I've increased coverage of by

[1/1] test_aifc
lines   cov%   module   (path)
  560    63%   aifc   (/Users/family/Documents/code/python/repo/Lib/

[1/1] test_aifc
lines   cov%   module   (path)
  561    82%   aifc   (/Users/family/Documents/code/python/repo/Lib/

I have also encountered couple of problems in
1. When using setmark() with string name to write to aiff file, you get Exception TypeError: "'str' does not support the buffer interface".
2. When using close() of Aifc_write object, it attempts to close it again in __del__() which ends with ValueError: write to closed file.

I propose following solutions to above problems in patch attached:
1. Use bytes type for mark names, because entire aifc library already uses bytes anyway.
2. Make file pointer check in close() and reset it after actually closing the file.

I don't think that these fixes will cause major backward compatibility problems, because with current version of aifc there is no way to write markers at all anyway.

I plan to increase test coverage of further in subsequent patches. Just want to make it in several small steps :-)

Please provide any feedback regarding to what should I do to make this patch committed.

Date User Action Args
2011-11-13 07:34:19Oleg.Plakhotnyuksetrecipients: + Oleg.Plakhotnyuk
2011-11-13 07:34:19Oleg.Plakhotnyuksetmessageid: <>
2011-11-13 07:34:18Oleg.Plakhotnyuklinkissue13394 messages
2011-11-13 07:34:18Oleg.Plakhotnyukcreate