Nick Coghlan ncogh...@gmail.com added the comment:
Sounds good - I'd say just commit whenever you're happy with it then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9757
___
Antoine Pitrou pit...@free.fr added the comment:
Committed in r84649. Thanks for the comments!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Here is a new patch adding the release() method as well.
--
Added file: http://bugs.python.org/file18801/memcontext2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9757
Nick Coghlan ncogh...@gmail.com added the comment:
On an eyeball review, the structure of do_release seems a little questionable
to me. I'd be happier if view.obj and view.buf were copied to C locals and then
set to NULL at the start of the function before any real work is done.
I believe the
Nick Coghlan ncogh...@gmail.com added the comment:
One other question: should IS_RELEASED use || rather than ?
Is there any case where either of those pointers can be NULL and we still want
to continue on rather than bailing out with a ValueError?
--
Antoine Pitrou pit...@free.fr added the comment:
On an eyeball review, the structure of do_release seems a little
questionable to me. I'd be happier if view.obj and view.buf were
copied to C locals and then set to NULL at the start of the function
before any real work is done.
You can't do
Nick Coghlan ncogh...@gmail.com added the comment:
I closed 9789 as a duplicate of this. Bringing the details from that issue over
here:
memoryview objects currently offer no way to explicitly release the underlying
buffer.
This may cause problems for
Guido van Rossum gu...@python.org added the comment:
Given this explanation, of course I am +1 on an explicit release() method. But
I'm still skeptical that a context manager adds much (not sure if that counts
as -0 or +0 :-).
I suppose after release() is called all accesses through the
Antoine Pitrou pit...@free.fr added the comment:
Given this explanation, of course I am +1 on an explicit release()
method. But I'm still skeptical that a context manager adds much (not
sure if that counts as -0 or +0 :-).
Ok, release() is probably enough.
I suppose after release() is
Nick Coghlan ncogh...@gmail.com added the comment:
Is this not covered by PEP 3118 at all?
The PEP says “this memory view object holds on to the memory of base
[i.e. the object the buffer was acquired from] until it is deleted”.
Apparently issues pertaining to delayed garbage collection
New submission from Antoine Pitrou pit...@free.fr:
This adds the context manager protocol to memoryview objects, as proposed on
python-dev. Once the `with` block has finished, the underlying buffer is
released and any operation on the memoryview raises a ValueError.
--
components:
Antoine Pitrou pit...@free.fr added the comment:
Guido expressed skepticism at the idea:
http://mail.python.org/pipermail/python-dev/2010-September/103442.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9757
12 matches
Mail list logo