[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-24 Thread STINNER Victor
STINNER Victor added the comment: Patch commited to 3.2 (r82200), blocked in 3.1 (r82201). -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > @lemburg: So what is your opinion on this issue? You're probably right: it's too late to change "s" to accept buffer interface compatible objects as well. In that case, symmetry is more imp

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: @lemburg: So what is your opinion on this issue? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-13 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17591/pyarg_z_no_bytes.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-13 Thread STINNER Victor
STINNER Victor added the comment: Update the patch to update also the new tests that I added in r81973 (to fix #8592). -- Added file: http://bugs.python.org/file17661/pyarg_z_no_bytes-2.patch ___ Python tracker __

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor
STINNER Victor added the comment: I patched readline (r81918) and locale (r81914) modules to use PyUnicode_FSConverter(). They don't use "z" format anymore to parse a filename. I checked last functions using "z" format (not "z#" or "z*", only "z") and I think that it's ok ("z" can be patched

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor
STINNER Victor added the comment: > I tried to reject types different than str for "z": > most tests of the test suite fail Wait, what? No. I modified the wrong line of code :-) The whole test suite pass without any error if "z" doesn't accept bytes anymore. -- _

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor
STINNER Victor added the comment: Some examples of functions using "s" format: * str.encode(encoding, errors), bytes.decode(encoding, errors): both arguments have to be unicode strings * compile(source, filename, mode, ...): filename and mode have to be unicode strings * crypt.crypt(word, s

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mercredi 09 juin 2010 13:06:53, vous avez écrit : >> "s" accepts bytes via the buffer interface > > No. "s*" and "s#" do accept any buffer compatible object (including bytes and > bytear

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread STINNER Victor
STINNER Victor added the comment: Le mercredi 09 juin 2010 13:06:53, vous avez écrit : > "s" accepts bytes via the buffer interface No. "s*" and "s#" do accept any buffer compatible object (including bytes and bytearray), but "s" doesn't. I fixed recently the documentation about that. --

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: "z" should not accept bytes... why not ? "z" is the same as "s" with the addition that passing None as parameter will result in the pointer to get set to NULL. "s" accepts bytes via the buffer interface, so why should "z" behave differently ? If a functio

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-09 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-08 Thread STINNER Victor
STINNER Victor added the comment: Hum, the patch doesn't update the documentation (at least Porting section of the What's new in Python 3.2). -- ___ Python tracker ___ _

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file17591/pyarg_z_no_bytes.patch ___ Python tracker ___

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-08 Thread STINNER Victor
New submission from STINNER Victor : "z" is supposed to be the same format than "s" but accepts None Except that "z" does also accept bytes. I suppose that "s" was "fixed" between Python2 and Python3, but "z" is not fixed yet. I think that it can be fixed in Python 3.2 without any deprecat