[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> t# was meant to provide access to text data, so replacing it with a >> parser code that is meant for binary data is not correct. The >> closes Python3 gets to t# from Python2 is s# or s*, so

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-08 Thread STINNER Victor
STINNER Victor added the comment: > t# was meant to provide access to text data, so replacing it with a > parser code that is meant for binary data is not correct. The > closes Python3 gets to t# from Python2 is s# or s*, so please use > those in the NEWS entry and s* in charbuffer_encode(). Do

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > New version of the patch: > - charbuffer_encode() uses y* instead of y# format to accept modifiable > buffer objects (eg. bytearray) > - Improve the documentation about the change > > @le

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-06-06 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - charbuffer_encode() uses y* instead of y# format to accept modifiable buffer objects (eg. bytearray) - Improve the documentation about the change @lemburg: So, do you agree with my patch? -- Added file: http://bugs.python

[issue8839] PyArg_ParseTuple(): remove "t# format

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

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 28 mai 2010 13:30:22, vous avez écrit : > Looking at the implementation again, I found that "y#" rejects > Unicode, while "s#" returns the default encoded version like > "t#" does in Python2. Oh, I didn't noticed that. > So I have to correct what I

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Given that "y#" is not (yet) in wide-spread use, ... > > t# is only used once (in codecs.charbuffer_encode()), whereas y# is used by > ossaudiodev, socket and mmap modules (there are 8 fun

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread STINNER Victor
STINNER Victor added the comment: > Given that "y#" is not (yet) in wide-spread use, ... t# is only used once (in codecs.charbuffer_encode()), whereas y# is used by ossaudiodev, socket and mmap modules (there are 8 functions using y#). There are 46 functions using y* format. y format is not u

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Patch to remove "t#": > - Update c-api/arg.rst documentation > - Replace "t#" format by "y#" in codecs.charbuffer_encode() > - Add a note in Doc/whatsnew/3.2.rst (in Porting to Python 3.2)

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread STINNER Victor
STINNER Victor added the comment: Patch to remove "t#": - Update c-api/arg.rst documentation - Replace "t#" format by "y#" in codecs.charbuffer_encode() - Add a note in Doc/whatsnew/3.2.rst (in Porting to Python 3.2) -- keywords: +patch Added file: http://bugs.python.org/file17479/ge

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > "t#" format was introduced by r11803 (11 years ago): "Implement new format > character 't#'. This is like s#, accepting an object that implements the > buffer interface, but requires a bu

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-27 Thread STINNER Victor
New submission from STINNER Victor : "t#" format was introduced by r11803 (11 years ago): "Implement new format character 't#'. This is like s#, accepting an object that implements the buffer interface, but requires a buffer that contains 8-bit character data." Python3 now has a strict separat