jorisvandenbossche commented on issue #38325:
URL: https://github.com/apache/arrow/issues/38325#issuecomment-2045953080

   > The other thing that comes to mind is that a lot of the capabilities being 
discussed here are definitely not limited to Python where they'd ideally be 
part of a C level spec / protocol
   
   Versioning of or tracking of capabilities in the C Data Interface itself is 
out of scope for this discussion, I would say (it's an interesting topic and 
has come up before, I think, but a much bigger discussion, eg because it 
requires a new struct). 
   
   And so if we are only speaking about versioning the python-level capsule 
interface, I still doubt that this is worth it (for the reasons I mentioned 
above, https://github.com/apache/arrow/issues/38325#issuecomment-2043536682, 
checking a version will almost be as much work as checking if a keyword is 
available in a python method). 
   
   The way that the Array API implemented this also isn't directly applicable 
in our case, AFAIU, given we don't have a namespace but just a method (so 
letting the consumer pass a `version` keyword to the dunder method would not 
help to determine which other keywords are available to be specified). 
   As mentioned above, we could add something like 
`__arrow_c_capsule_version__` returning 1.0 (added the "capsule" to make it 
clear it is about the capsule interface, not the c interface itself), and that 
version could indicate which methods are available. But even then as a consumer 
you might need to ensure to handle failures for a certain keyword anyway (for 
example, we currently have the `requested_schema` keyword, but even in pyarrow 
we initially didn't implement that for all cases, so potentially raising a 
NotImplementedError when that is passed. Do we then fully implement version 1.0 
and can we return as version?)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to