[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Stefan Behnel


Change by Stefan Behnel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 1d711f2e31e02b2e9cbe4f109bf79541f56c35a2 by Miss Islington (bot) 
in branch '3.9':
bpo-40724: Fix return type of test helper function 
heapctypewithbuffer_releasebuffer() (GH-20685) (GH-20690)
https://github.com/python/cpython/commit/1d711f2e31e02b2e9cbe4f109bf79541f56c35a2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19905
pull_request: https://github.com/python/cpython/pull/20690

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 1e4fa91104a03c44baa241326102cbec42d387f1 by Miss Islington (bot) 
in branch '3.9':
bpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683)
https://github.com/python/cpython/commit/1e4fa91104a03c44baa241326102cbec42d387f1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre
nosy_count: 8.0 -> 9.0
pull_requests: +19904
pull_request: https://github.com/python/cpython/pull/20685

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-06 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset f7c4e236429606e1c982cacf24e10fc86ef4462f by scoder in branch 
'master':
bpo-40724: Support setting buffer slots from type specs (GH-20648)
https://github.com/python/cpython/commit/f7c4e236429606e1c982cacf24e10fc86ef4462f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +19895
pull_request: https://github.com/python/cpython/pull/20683

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-06-05 Thread Stefan Behnel


Change by Stefan Behnel :


--
keywords: +patch
pull_requests: +19868
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20648

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-05-28 Thread Petr Viktorin


Petr Viktorin  added the comment:

Yes, it should be possible to wrap them in #if so they aren't part of the 
stable ABI.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40724] Support buffer protocol with type specs

2020-05-22 Thread Stefan Behnel


New submission from Stefan Behnel :

As far as I can see it in typeslots.h [1], the buffer protocol is still not 
supported when using type specs:

/* Disabled, see #10181 */
#undef Py_bf_getbuffer
#undef Py_bf_releasebuffer

It seems that the discussion in issue 10181 did not lead anywhere at the time 
(2010-2012).

I'm not talking about the limited API or the stable ABI here, I'm talking about 
using type specs to define an extension type. The work-around is to manually 
set "PyTypeObject->tp_as_buffer" after creating the type, but since 
PyType_Ready() then does not see that struct pointer, you also still have to 
make sure that the type correctly inherits the slots from the base type if 
you're not defining all of them yourself.

Can we just add support for the above slots?

[1] 
https://github.com/python/cpython/blob/ca829102213c466ffecb1e464be5c8cb3967d961/Include/typeslots.h#L2-L4

--
components: C API
messages: 369561
nosy: ncoghlan, paul.moore, petr.viktorin, pitrou, scoder, skrah, vstinner
priority: normal
severity: normal
status: open
title: Support buffer protocol with type specs
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com