[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Removed file: http://bugs.python.org/file26479/array_sizeof.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Removed file: http://bugs.python.org/file26510/array_sizeof_v3.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Ludwig Hähne added the comment: Meador, Serhiy, I've add patches for Python 2.7 and Python 3.2 following Serhiy suggestions. -- ___ Python tracker <http://bugs.python.org/is

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Removed file: http://bugs.python.org/file26480/array_sizeof_v2.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Removed file: http://bugs.python.org/file26713/array_sizeof_v4.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Added file: http://bugs.python.org/file26757/array_sizeof_3.2.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-10 Thread Ludwig Hähne
Changes by Ludwig Hähne : Added file: http://bugs.python.org/file26756/array_sizeof_2.7.patch ___ Python tracker <http://bugs.python.org/issue15424> ___ ___ Python-bug

[issue15424] __sizeof__ of array should include size of items

2012-08-07 Thread Ludwig Hähne
Ludwig Hähne added the comment: Meador, thanks for reviewing. The updated patch is now attached to the bug. -- Added file: http://bugs.python.org/file26718/array_sizeof_v5.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15424] __sizeof__ of array should include size of items

2012-08-06 Thread Ludwig Hähne
Ludwig Hähne added the comment: Serhiy, the tests now explicitly check the base size of the array. I'm not sure if I got the base size compution right (only checked on 32bit Linux). Could you check that the struct definition in the test makes sense and matches the C arrayobject defin

[issue15424] __sizeof__ of array should include size of items

2012-07-25 Thread Ludwig Hähne
Ludwig Hähne added the comment: Revised the patch based on the discussion in issue #15402 (http://bugs.python.org/msg166372). It doesn't typecast the function anymore and instead casts to the array type inside the function. -- Added file: http://bugs.python.org/file

[issue15424] __sizeof__ of array should include size of items

2012-07-22 Thread Ludwig Hähne
Ludwig Hähne added the comment: Yes, it would be great if the change could be applied to 3.2 (and 2.7) but I guess not many people will be affected by the problem. BTW, I just submitted the contributor form. -- ___ Python tracker <h

[issue15424] __sizeof__ of array should include size of items

2012-07-22 Thread Ludwig Hähne
Ludwig Hähne added the comment: Uses self->allocated instead of Py_SIZE as Martin suggested. -- Added file: http://bugs.python.org/file26480/array_sizeof_v2.patch ___ Python tracker <http://bugs.python.org/issu

[issue15424] __sizeof__ of array should include size of items

2012-07-22 Thread Ludwig Hähne
New submission from Ludwig Hähne : If sys.getsizeof is called on an array, the result doesn't include the size of the items: >>> from array import array >>> a = array("i", [0] * 10) >>> a.__sizeof__() 40 While this makes sense for a list, an a

[issue2320] Race condition in subprocess using stdin

2008-03-20 Thread Ludwig Hähne
Ludwig Hähne <[EMAIL PROTECTED]> added the comment: Just realized that passing 'close_fds=True' also circumvents the problem: s = subprocess.Popen(("cat"), stdin=subprocess.PIPE, close_fds=True) Should this issue be closed as it's that easy to avoid? I would

[issue2320] Race condition in subprocess using stdin

2008-03-19 Thread Ludwig Hähne
Ludwig Hähne <[EMAIL PROTECTED]> added the comment: Hi, I narrowed the problem down to the creation of the error pipe in _execute_child: >> errpipe_read, errpipe_write = os.pipe() >> self._set_cloexec_flag(errpipe_write) If I protect these two lines with a lock, I cannot

[issue2320] Race condition in subprocess using stdin

2008-03-17 Thread Ludwig Hähne
New submission from Ludwig Hähne <[EMAIL PROTECTED]>: Pythons subprocess module has a race condition when stdin is used. The problem can be reproduced with the following script (based on the script in issue "#1731717"/"msg32210" (slightly changed to use stdin):