[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-24 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Commited to 3.2 (r82208), blocked in 3.1 (r82209).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-24 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-14 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

New (improved) version of the patch:
 - Remove also w# format
 - Write tests for w* format

--
Added file: http://bugs.python.org/file17670/remove_w_format-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-14 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also #8926.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-13 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

w# is not only useless but also not used in py3k source code. w is also not 
used. Only w* is used by fnctl and socket modules.

The problem with w# is that the caller cannot release the buffer and so we 
cannot lock the buffer. I don't know exactly what happens if you get a pointer 
to a bytearray, release the GIL and then use it, whereas another thread 
modifies and/or destroys the bytearray object. (I suppose that something bad 
will happen, like a segfault)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-08 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I'd point out that w# is mostly useless too. It's supposed to return a 
read-write buffer, but as the doc says it also doesn't support mutable 
objects, since it isn't able to properly lock/pin the buffer; therefore it 
probably doesn't support anything useful.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-06-06 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Attached patch removes w format, cleanups the code for w* and w# formats, 
and update the documentation.

--
keywords: +patch
Added file: http://bugs.python.org/file17571/remove_w_format.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8850] Remove w format of PyParse_ParseTuple()

2010-05-28 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

w format is dangerous because it doesn't give the size of the buffer: the 
caller may write outside the buffer (buffer overflow).

w* and w# formats are fine.

It looks like w format is not used in trunk nor py3k (only w# and w*).

--
components: Interpreter Core
messages: 106702
nosy: haypo
priority: normal
severity: normal
status: open
title: Remove w format of PyParse_ParseTuple()
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8850
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com