[issue15843] aifc.open expects only str or file pointer

2012-09-02 Thread Petri Lehtinen
Petri Lehtinen added the comment: My fellow coredevs confirm that this would be a new feature, so it's out of scope for 2.7 (which is in bugfix-only mode). It's also deterministic in the sense that you can easily work around it by encoding the unicode filename to the filesystem encoding first.

[issue15843] aifc.open expects only str or file pointer

2012-09-02 Thread Berker Peksag
Berker Peksag added the comment: I've attached a patch with a test case. -- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file27099/issue15843.patch ___ Python tracker ___

[issue15843] aifc.open expects only str or file pointer

2012-09-02 Thread Petri Lehtinen
Petri Lehtinen added the comment: Since this problem is specific to 2.7, the offending line is actually http://hg.python.org/cpython/file/2.7/Lib/aifc.py#l344: 344 if type(f) == type(''): -- components: +Library (Lib) -None keywords: +easy nosy: +petri.lehtinen stage: -> needs pat

[issue15843] aifc.open expects only str or file pointer

2012-09-01 Thread Alastair Porter
New submission from Alastair Porter: Passing a unicode filename to aifc.open() results in the argument being treated like a filepointer instead of opening the file. The argument check, http://hg.python.org/cpython/file/default/Lib/aifc.py#l332 only checks if the argument is a str. Should this b