[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 44dac2e7fcb8 by Benjamin Peterson in branch '2.7': support pep 3118 format strings for ctypes objects with nontrivial shapes (closes #10744) http://hg.python.org/cpython/rev/44dac2e7fcb8 New changeset 22938bf57161 by Benjamin Peterson in branch '3.

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-12 Thread mattip
mattip added the comment: Updated patch for default for empty shape, thanks eryksun -- Added file: http://bugs.python.org/file35224/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread eryksun
eryksun added the comment: The shape for the StructWithArrays test should be () in 3.x; it's None in 2.x. -- nosy: +eryksun versions: +Python 3.3 -Python 3.5 ___ Python tracker _

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge versions: +Python 3.5 -Python 2.7, Python 3.3 ___ Python tracker ___ ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread mattip
mattip added the comment: Here is the patch for HEAD -- Added file: http://bugs.python.org/file35218/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread mattip
mattip added the comment: Here are updated patches for 2.7 and HEAD. I've updated the patches for both python 2 and python 3 and addressed some of the issues here: 1. Added _ctypes_alloc_format_string_with_shape() to ctypes.h 2. Changed the buffer size calculation to 32 *ndim + 3 (for the ques

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: The correct format string for Py_ssize_t with sprintf is "%"PY_FORMAT_SIZE_T"d" (defined and explained in pyport.h). -- nosy: +ronaldoussoren ___ Python tracker _

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Stefan Krah
Stefan Krah added the comment: Basically someone has to review the patch and commit it. I'm not really using ctypes, so for me a decent review would take a while. -- ___ Python tracker _

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor
STINNER Victor added the comment: @skrah: What is the status of this issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Tillmann Karras
Changes by Tillmann Karras : -- nosy: +Tilka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-16 Thread Pauli Virtanen
Pauli Virtanen added the comment: The array notation is useful for arrays inside structs, such as "T{(4)i(2,3)f}". -- ___ Python tracker ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-14 Thread Stefan Krah
Stefan Krah added the comment: Thanks for the patch. I agree with the interpretation of the format string. One thing is unclear though: Using this interpretation the multi-dimensional array notation in format strings only seems useful for pointers to arrays. The PEP isn't so clear on that, wou

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-10 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-21 Thread Georg Brandl
Changes by Georg Brandl : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-21 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-20 Thread Pauli Virtanen
New submission from Pauli Virtanen : Ctypes arrays have invalid buffer interface information (on Python 3.1.2): >>> import ctypes >>> x = (ctypes.c_double*2)() >>> y = memoryview(x) >>> y.shape (2,) >>> y.format '(2)http://projects.scipy.org/numpy/ticket/1699) -- assignee: theller compo