[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed with some changes. Thank you for your contribution Joseph. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ab8f5259f09 by Serhiy Storchaka in branch 'default': Issue #25788: fileinput.hook_encoded() now supports an "errors" argument https://hg.python.org/cpython/rev/8ab8f5259f09 -- nosy: +python-dev ___

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-27 Thread Joseph Hackman
Joseph Hackman added the comment: Updated documentation in fileinput.rst, Doc/whatsnew/3.6.rst, Misc/NEWS and Misc/ACKS. Thank you so much Serhiy for taking the time to review! -- Added file: http://bugs.python.org/file42631/issue25788-3.patch ___

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I forget. Needed updates of the documentation (including the "versionchanged" directive). And would be nice if you add corresponding entities in Doc/whatsnew/3.6.rst, Misc/NEWS and Misc/ACKS. The rest of the patch LGTM. --

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-26 Thread Joseph Hackman
Joseph Hackman added the comment: Uploading a new patch to address the issues in previous patch. -- Added file: http://bugs.python.org/file42620/issue25788-2.patch ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld (follow the "review" link beside the patch link). -- assignee: -> serhiy.storchaka ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-25 Thread Joseph Hackman
Joseph Hackman added the comment: Ping. Just wondering if anyone on the nosy list would be willing to help review my patch. :) -- ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-02-02 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: needs patch -> patch review ___ Python tracker ___

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-02-01 Thread Joseph Hackman
Joseph Hackman added the comment: I haven't seen OP in over 30 days, so am posting my own patch. I've added an optional argument that defaults to strict and gets passed along. I've updated the primary test to verify the argument passing, as well as that things get handled as specified in the

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-01-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: fileinput is in Python, hence the source is in Lib. Online version is https://hg.python.org/cpython/file/tip/Lib/fileinput.py https://hg.python.org/cpython/file/tip/Lib/test/test_fileinput.py Patching openhook itself looks trivial. A test is the hard part.

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-09 Thread Swati Jaiswal
Swati Jaiswal added the comment: I want to work on this issue. @lac, can you please help as I searched but couldn't find the related files. Where can I find the code for this? -- nosy: +curioswati ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-03 Thread Laura Creighton
New submission from Laura Creighton: Right now there is no way, aside from writing your own openhook, to get around the limitation that openhook=fileinput.hook_encoded("utf") will open things with the default option for codecs.open() of errors=strict. Adding a way to pass the errors argument

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be easy to add the errors parameter to fileinput.hook_encoded(). Do you want to provide a patch Laura? -- components: +Library (Lib) keywords: +easy stage: -> needs patch type: -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3,

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: https://docs.python.org/devguide/#contributing -- components: +Library (Lib) type: -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-03 Thread Laura Creighton
Laura Creighton added the comment: I haven't made a patch to Python for over 10 years. Before mercurial. :) Where do you start in terms of 'how to submit a patch'? -- components: -Library (Lib) type: enhancement -> versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2015-12-03 Thread R. David Murray
R. David Murray added the comment: Mercurial didn't change the patch submission process (we're talking about making such changes on python-workflow now...or rather enhancements as the current process should continue to work). The only thing that mercurial changed is how you get a copy of the