[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 large, then what's the meaning of setting it?


Thus, it might be more practical to increase the value of MAXLINE so that 99% 
messages can pass through.

--
nosy: +introom

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



[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) or seek(offset, whence) is allowed.

Passing seek(offset, whence=SEEK_FOOBAR) will throw an error.

The patch fixes the function signature as seek(offset[, whence])

--
assignee: docs@python
components: Documentation
files: seek.patch
keywords: patch
messages: 250200
nosy: berker.peksag, docs@python, ezio.melotti, introom
priority: normal
severity: normal
status: open
title: io.[Text]IOBase.seek doesn't take keyword parameter
versions: Python 3.5
Added file: http://bugs.python.org/file40406/seek.patch

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



[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 parameter -> io.

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



[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: berker.peksag, ezio.melotti, introom
priority: normal
severity: normal
status: open
title: Make parameter of io.base to be positional and keyword
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file40427/patch.diff

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



[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 hinder. If there is one commiter that is interested to merge in
the related code, I might consider taking my time and handling the
rest related similar functions, including the test and the doc.

--

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



[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 
<http://bugs.python.org/issue25007>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

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



[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  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.

-- 

吾輩は猫である。ホームーページはhttp://introo.me。

--

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



[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 
<http://bugs.python.org/issue23840>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16991] Add OrderedDict written in C

2015-04-02 Thread shiyao.ma

Changes by shiyao.ma :


--
nosy: +introom

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