This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support getbuffer redirection scheme in memoryview
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: skrah Nosy List: meador.inge, ncoghlan, pitrou, python-dev, scoder, skrah
Priority: normal Keywords: patch

Created on 2012-03-03 08:29 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue14181-doc.diff skrah, 2012-03-06 12:59 review
Messages (11)
msg154826 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-03-03 08:29
Supporting chained objects that redirect getbuffer requests to a single
exporter rather than re-exporting the buffer is a matter of removing an
assert, but it needs tests and documentation updates.
msg154931 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-05 08:37
New changeset f1441971b621 by Stefan Krah in branch 'default':
Issue #14181: Allow memoryview construction from an object that uses the
http://hg.python.org/cpython/rev/f1441971b621
msg154932 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-03-05 09:02
I didn't ask for review since in the production code only the assert()
line is removed. There are a couple of new tests and I have a private
version of test_buffer that runs most tests with an ndarray chain
using either redirection or re-exporting. As expected, there are no
problems in allowing getbuffer redirection.

Leaving this open as a documentation issue.
msg154946 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-05 13:40
New changeset 3a1f7c9f0b25 by Stefan Krah in branch 'default':
Issue #14181: Test creating memoryviews from a static exporter with both
http://hg.python.org/cpython/rev/3a1f7c9f0b25
msg154947 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-03-05 13:48
I'm abusing the issue to settle all concerns that came up on python-dev:

The tests added in the latest commit show that it's indeed no
problem if an atypical static exporter sets view.obj to NULL.
msg154948 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2012-03-05 14:17
Then I'm abusing this ticket to say: thanks for verifying this.
msg154963 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-05 16:51
New changeset 9f7d06a9eabe by Stefan Krah in branch 'default':
Issue #14181: Preserve backwards compatibility for getbufferprocs that a) do
http://hg.python.org/cpython/rev/9f7d06a9eabe
msg155012 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-03-06 12:59
> Then I'm abusing this ticket to say: thanks for verifying this.

I would still like to sweep this fact under the rug. :)


Could you have a look at the documentation patch and see if it's clearer?
msg155013 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2012-03-06 13:07
Yes, I think this is much clearer.
msg155015 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-06 13:55
New changeset da2aaced21bd by Stefan Krah in branch 'default':
Issue #14181: Improve clarity in the documentation for the multi-purpose
http://hg.python.org/cpython/rev/da2aaced21bd
msg155016 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-03-06 14:19
OK, for me the view->obj issues are done. The new tests indicate
that we can silently keep backwards compatibility for view->obj==NULL,
but I suppressed that fact in the documentation because it's already
complicated enough.

Perhaps we might want to deprecate (if one can deprecate an
undocumented feature) view->obj==NULL at some point.



Stefan, thanks for bringing all this up on python-dev!
History
Date User Action Args
2022-04-11 14:57:27adminsetgithub: 58389
2012-03-06 14:19:54skrahsetstatus: open -> closed
resolution: fixed
messages: + msg155016

stage: resolved
2012-03-06 13:55:45python-devsetmessages: + msg155015
2012-03-06 13:07:55scodersetmessages: + msg155013
2012-03-06 12:59:16skrahsetfiles: + issue14181-doc.diff
keywords: + patch
messages: + msg155012
2012-03-05 16:51:47python-devsetmessages: + msg154963
2012-03-05 14:17:28scodersetmessages: + msg154948
2012-03-05 13:48:03skrahsetmessages: + msg154947
2012-03-05 13:40:14python-devsetmessages: + msg154946
2012-03-05 09:02:38skrahsetmessages: + msg154932
components: + Documentation
stage: test needed -> (no value)
2012-03-05 08:37:28python-devsetnosy: + python-dev
messages: + msg154931
2012-03-05 04:56:25meador.ingesetnosy: + meador.inge
2012-03-03 08:29:22skrahcreate