[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-12-16 Thread Lucas Maystre

Lucas Maystre added the comment:

Sorry for the little glitches you had to fix, I wonder why I didn't catch them.
Anyways, thanks Petri!

--

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-12-02 Thread Lucas Maystre

Lucas Maystre added the comment:

As per Ezio's comment, changed "l1" to "utf-8" in the example of the doc.

--
Added file: http://bugs.python.org/file28195/filetype11175.patch

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-27 Thread Lucas Maystre

Lucas Maystre added the comment:

Added some documentation for the patch. Let me know what you think.

--
Added file: http://bugs.python.org/file28139/filetype11175.patch

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-27 Thread Lucas Maystre

Lucas Maystre added the comment:

OK, I'll give it a try.

--

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-26 Thread Lucas Maystre

Lucas Maystre added the comment:

Is there something I can do something to move this forward?

--

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-26 Thread Lucas Maystre

Lucas Maystre added the comment:

Alright, here's a version with more tests (unittest.mock is awesome!). I think 
it tests exactly what it should (and no more), i.e. that the arguments are 
correctly passed to `open`.

--
Added file: http://bugs.python.org/file27729/filetype11175.patch

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-23 Thread Lucas Maystre

Lucas Maystre added the comment:

OK, as discussed offline with Petri I'll put some tests to ensure that open() 
is called the right way (using unittest.mock.patch).

--

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-23 Thread Lucas Maystre

Lucas Maystre added the comment:

Here's an attempt at implementing this (my first contribution). Some notes:

- I tried to keep `__repr__()` backwards compatible. It would have been easier 
to inherit from `_AttributeHolder`, but maybe this might break some things...
- I added some test cases for `__repr__()`, but that's it. I don't think 
there's any other sensible test to do, as we're really just passing stuff to 
`open()`
- not sure about the style, especially line breaks...

--
keywords: +patch
nosy: +lum
Added file: http://bugs.python.org/file27674/filetype11175.patch

___
Python tracker 
<http://bugs.python.org/issue11175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com