[issue25007] Add support of copy protocol to zlib compressors and decompressors

2015-09-12 Thread shiyao.ma
shiyao.ma added the comment: per serhiy's suggestion, added two aliases. -- keywords: +patch nosy: +introom Added file: http://bugs.python.org/file40446/patch.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25057] Make parameter of io.base to be positional and keyword

2015-09-11 Thread shiyao.ma
shiyao.ma added the comment: You've listed much of the benefits it can bring about. The real problem is there are many places like iobase.seek to modify to support keyword argument, and seems not many people think it's a good idea to do that, per issue 8706. But I think the former is the main

[issue25057] Make parameter of io.base to be positional and keyword

2015-09-10 Thread shiyao.ma
New submission from shiyao.ma: The parameters for io.[Text]IOBase.seek are currently positional only, as discussed in http://bugs.python.org/issue25030. We make the parameters to be both positional and keyword based. -- files: patch.diff keywords: patch messages: 250382 nosy

[issue25030] io.[Text]IOBase.seek doesn't take keyword parameter

2015-09-08 Thread shiyao.ma
New submission from shiyao.ma: The doc is here: https://docs.python.org/3.5/library/io.html#io.IOBase.seek and here: https://docs.python.org/3.5/library/io.html#io.TextIOBase.seek It is said the parameter list is in the form of: seek(offset, whence=SEEK_SET) But actually only: seek(offset

[issue25030] io.

2015-09-08 Thread shiyao.ma
shiyao.ma added the comment: Thanks for your comment. I had a read of pep457. It's still in draft status, so incorporating the / indicator is not much a concern AFAIK. Any further modification for me to do to get that merged? -- title: io.[Text]IOBase.seek doesn't take keyword

[issue23906] poplib maxline behaviour may be wrong

2015-08-12 Thread shiyao.ma
shiyao.ma added the comment: Instead of setting a MAXSIZE for the email body, rasing up the MAXLINE might be more meaningful. Consider the case of MAXSIZE, it's essentially the same as MAXLINE. If MAXSIZE is relatively small, some messages won't pass through. If the MAXSIZE is relatively

[issue16991] Add OrderedDict written in C

2015-04-02 Thread shiyao.ma
Changes by shiyao.ma i...@introo.me: -- nosy: +introom ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread shiyao.ma
shiyao.ma added the comment: Based upon the previous review. Catch the TextWrapper, move the test into a function. -- Added file: http://bugs.python.org/file38796/tokenizeV2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread shiyao.ma
shiyao.ma added the comment: ITSM it's not the TextIOWrapper but the detect_encoding fails and throws an error. So I wrapped a try/catch block around that. -- keywords: +patch nosy: +introom Added file: http://bugs.python.org/file38792/tokenize.patch

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread shiyao.ma
shiyao.ma added the comment: On Wed, Apr 1, 2015 at 6:18 PM, STINNER Victor rep...@bugs.python.org wrote: Oh, right. But TextIOWrapper can fail for differen reasons. For example, CTRL+c may send KeyboardInterrupt. Yes. Any comment on the test? I wil update a second patch. Regards. -- 吾