[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-28 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Thanks, Nick! I'll move the function declaration back to abstract.h. Waiting for Georg's input. -- It seems to me that #14330 is a blocker that will only be fixed on Monday. -- ___ Python

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: With the beta delayed as you say, I'm okay with this going in now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834 ___

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8fbbc7c8748e by Stefan Krah in branch 'default': Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. http://hg.python.org/cpython/rev/8fbbc7c8748e -- ___

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-28 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: All right, 3.3 is fixed. Re-targeting for 3.2 and 2.7. -- priority: release blocker - normal versions: +Python 3.1 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Any objections to committing this before beta2? What about the len view-len change: Does that look reasonable? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Georg, need a call on how close you are to cutting beta 2 and whether you want this to wait until rc1. -- nosy: +benjamin.peterson, georg.brandl priority: normal - release blocker ___ Python tracker

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Summary of my review for Georg's benefit: I had one minor formatting nit with the patch (which Stefan can easily fix before committing), but it otherwise looked fine to me. I also agree that the old implicit truncation was unusable in

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-25 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Here's a patch for 3.3, which consists mostly of tests. A couple of points: o I removed the len view-len check in PyBuffer_ToContiguous(), since the function is not documented and silently accepting output buffers that are too

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-21 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: There is an additional problem with PyBuffer_ToContiguous(): Suppose 'view' is multi-dimensional, C-contiguous and initialized according to PyBUF_ND, i.e. view-shape != NULL but view-strides == NULL. Now if PyBuffer_ToContiguous() is

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-20 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The fix would require all of these functions from memoryview.c (3.3): last_dim_is_contiguous cmp_structure copy_base copy_rec copy_buffer How to avoid code duplication? I could move them into abstract.c, but conceptually they're really

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-20 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: You could move PyBuffer_ToContiguous() from abstract.c to memoryview.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834 ___

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-20 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: You could move PyBuffer_ToContiguous() from abstract.c to memoryview.c. For 3.3 that would be ideal, yes. I asked a while ago on python-dev whether to backport the memoryview rewrite. The general mood was against it. So, for 2.7/3.2 I

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-19 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: It looks like Stefan has fixed the issue in Python 3.3 a while ago. tobytes() returns the correct values with a fresh build of Python 3.3. $ PYTHONPATH=. /home/heimes/dev/python/py3k/python smc/freeimage/tests/test_image.py test_newbuffer

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-19 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: In Python 3.3 memoryobject.c is a complete rewrite. Porting the fix separately would be quite a bit of work. PyBuffer_ToContiguous(), which causes the problem in 2.7/3.2 and is still broken in 3.3, could be fixed by using the recursive

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-18 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: I think that I run into the same bug today. I've developing a PEP 3118 buffer interface for my wrapper of FreeImage. It returns the data as non-contiguous 3d array with the dimension height, width, color. I've created a small test image

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-18 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834 ___ ___ Python-bugs-list

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-02-25 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3f9b3b6f7ff0 by Stefan Krah in branch 'default': - Issue #10181: New memoryview implementation fixes multiple ownership http://hg.python.org/cpython/rev/3f9b3b6f7ff0 -- nosy: +python-dev

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-01-25 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I removed the dependency since PyBuffer_ToContiguous() still needs to be fixed in abstract.c while memoryview.tobytes() now works in the PEP-3118 repo. -- dependencies: -Problems with Py_buffer management in memoryobject.c (and