Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Feb 21, 2012, 5:16 AM

Post #1 of 12 (138 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

Nick Coghlan <ncoghlan [at] gmail> added the comment:

Latest version looks good to me - I vote for landing it whenever you're ready :)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 24, 2012, 7:16 AM

Post #2 of 12 (128 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

Thanks, Nick. I'll try to get it done this weekend.

I've uploaded Misc/NEWS and Doc/whatsnew/3.3.rst (my apologies to Antoine
for plagiarizing the first sentence, I found it hard to come up with a
better version).

I wasn't sure whether to put the "whatsnew" entry into the section
"Other Language Changes" or into the PEP section. I chose the latter,
since many new features have been added that are part of the PEP.

----------
Added file: http://bugs.python.org/file24629/issue10181-news.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 24, 2012, 9:25 AM

Post #3 of 12 (130 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Nick Coghlan <ncoghlan [at] gmail> added the comment:

PEP section makes sense - I plan to mark PEP 3118 as Final once you commit this (or you can do that yourself, for that matter).

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 25, 2012, 3:25 AM

Post #4 of 12 (139 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Roundup Robot <devnull [at] psf> 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

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 26, 2012, 2:30 AM

Post #5 of 12 (132 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

Nick Coghlan <report [at] bugs> wrote:
> PEP section makes sense - I plan to mark PEP 3118 as Final once you commit
> this (or you can do that yourself, for that matter).

Array features are complete except for multi-dimensional indexing and slicing.
I think it would be nice to add those in a separate issue; it's not a lot of
additional code and it doesn't interfere with the current code.

The overall array handling scheme is sound. Life would be a bit easier
if contiguity flags were a mandatory part of the Py_buffer structure
that the exporter has to fill in.

Then there is an open issue (#3132) for expanding the struct module syntax,
where the wording in some sections of the PEP led to a bit of head-scratching. :)

In another issue (#13072) the question came up whether the proposed 'u' and 'w'
formats still make sense after PEP-393 (I think they do, they should map to
UCS-2 and UCS-4).

We need to decide what to do about 2.7 and 3.2. It's pretty difficult by
now to separate the bug fixes from the features. I could follow the example
of CPU manufacturers: start with the whole feature set and disable as much
as possible.

Another problem for 2.7 and 3.2 is that the 'B' format would still need to
accept bytes instead of ints. Or can we change that as a bug fix?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 26, 2012, 3:34 AM

Post #6 of 12 (132 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Nick Coghlan <ncoghlan [at] gmail> added the comment:

Aw, I guess I was too optimistic in thinking this was the last gap before we could declare it Final...

+1 on creating a new feature request for NumPy style multi-dimensional indexing and slicing support on memoryview (I'm assuming that's what you meant).

As far as your last question goes, I'm not sure we *can* salvage this in 2.7/3.2. We do have the option of throwing our hands up in the air and saying "Sorry, we couldn't figure out how to fix it without completely rewriting it. Take a look at 3.3 if you want to see how it's *supposed* to work."

I hesitate to suggest this (since I'm not volunteering to do the work) but perhaps it would be worth packaging up the 3.3. memoryview and publishing it on PyPI for the benefit of 3.2 and 2.7?

May also be worth bringing up on python-dev to see if anyone else has any bright ideas. Myself, I'm not seeing any real choices beyond "won't fix", "backport 3.3 version and remove/disable the new features", "backport 3.3 version, new features and all" and "publish a full featured version on PyPI".

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 29, 2012, 3:33 AM

Post #7 of 12 (124 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

I'm busy adding the C-API changes to the docs. Regarding the stable ABI:

The general mood was to *keep* the removal of the buffer interface
for some time, did I get that right?

In that case this removal (especially of the Py_buffer struct) should
be documented also for 3.2.

----------
nosy: +loewis

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 29, 2012, 8:54 AM

Post #8 of 12 (133 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 9d3c7dd55c7f by Stefan Krah in branch 'default':
Issue #10181: Add warning that structure layouts in memoryobject.h and
http://hg.python.org/cpython/rev/9d3c7dd55c7f

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Feb 29, 2012, 1:18 PM

Post #9 of 12 (126 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Nick Coghlan <ncoghlan [at] gmail> added the comment:

For 3.2, there's no removal to document - we asked MvL to drop the buffer APIs from PEP 384, so they've never been part of the stable ABI.

>From the PEP: "The buffer interface (type Py_buffer, type slots bf_getbuffer and bf_releasebuffer, etc) has been omitted from the ABI, since the stability of the Py_buffer structure is not clear at this time. Inclusion in the ABI can be considered in future releases."

I agree we shouldn't be hasty in making even the updated buffer interface implementation officially part of the stable ABI. Better to leave it out for 3.3, get some real world feedback on the latest version, then commit to stability for 3.4+.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Mar 1, 2012, 12:32 AM

Post #10 of 12 (129 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Stefan Krah <stefan-usenet [at] bytereef> added the comment:

> From the PEP: "The buffer interface (type Py_buffer, type slots bf_getbuffer
> and bf_releasebuffer, etc) has been omitted from the ABI, since the stability
> of the Py_buffer structure is not clear at this time. Inclusion in the ABI
> can be considered in future releases."

Great, that's exactly what I was looking for. - As far as I can see the issue
is finished, so I'm closing it. Thanks again everyone for all the help!

----------
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Mar 2, 2012, 5:14 AM

Post #11 of 12 (122 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Nick Coghlan <ncoghlan [at] gmail> added the comment:

It occurs to me that one thing that *could* be backported to early versions are some of the documentation improvements on how to correctly handle the lifecycle of fields in Py_buffer. That gets messy though because memoryview doesn't behave nicely in those versions, so we'd be violating our own guidelines.

Perhaps the relevant sections should be updated with a reference saying that the semantics have been cleaned up in 3.3, and if in doubt, try to follow the 3.3 documentation?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Mar 5, 2012, 1:51 AM

Post #12 of 12 (118 views)
Permalink
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?) [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 373f6cdc6d08 by Stefan Krah in branch 'default':
Issue #10181: The decision was to raise a buffer error in memory_exit()
http://hg.python.org/cpython/rev/373f6cdc6d08

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.