3dbrows commented on PR #13633:
URL: https://github.com/apache/arrow/pull/13633#issuecomment-1193827299

   Had another go at this, although have some doubts.
   * Cython imports: I'm importing what I think are the very minimally 
necessary definitions from the C++ headers. In particular,
     * I need nothing from `Aws::Client::RetryStrategy` except to know that it 
exists;
     * I need to know only the constructors of 
`Aws::Client::StandardRetryStrategy` and `Aws::Client::AdaptiveRetryStrategy` 
so I can reference them elsewhere;
     * My line of thinking is that this gives me all I need for Cython to 
`make_shared` the underlying C++ types, but this is quite possibly wrongheaded 
(I haven't touched Cython before).
   
   * Typing questions
     * The `S3Options` type takes an `S3RetryStrategy`, but in Cython we're now 
feeding it a subclass of `Aws::Client::RetryStrategy` - which so happens to 
have similar method signatures. Whether this is considered "safe" or "correct" 
(or even "works") I am not sure. My confusion is that it feels like attempting 
duck-typing in a type-safe language, which I didn't think would be something 
you could do.


-- 
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