You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/03 15:24:57 UTC

[GitHub] [arrow-adbc] lidavidm opened a new issue, #53: [Python] Driver distribution

lidavidm opened a new issue, #53:
URL: https://github.com/apache/arrow-adbc/issues/53

   We don't want to/can't futz with shared libraries when distributing packages. Instead, since drivers have an entrypoint, just expose the entrypoint in Python?
   
   e.g. `adbc_driver_sqlite` will bundle the driver and expose `adbc_driver_sqlite._entrypoint(driver_address: int) -> int` ~= `AdbcStatusCode _entrypoint(struct AdbcDriver* driver)`. Then the driver manager can just import the package and call the entrypoint. (There'll need to be some support for this on the C++ side too)
   
   That way we can more easily distribute pip-installable packages


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm closed issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
lidavidm closed issue #53: [Python] Driver distribution
URL: https://github.com/apache/arrow-adbc/issues/53


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #53:
URL: https://github.com/apache/arrow-adbc/issues/53#issuecomment-1227480297

   That sounds reasonable to me. I'll update the draft once #61 gets through.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #53:
URL: https://github.com/apache/arrow-adbc/issues/53#issuecomment-1227477183

   This isn't about actually implementing a driver in Python - only about packing up a driver written in C/C++ as a Python package in such a way that it can be easily installed and used. The driver manager can initialize a connection from a `struct AdbcDriver*`, so we just need some coordination in Python.
   
   Or do you mean, we skip the entrypoint and just have people do something like this:
   
   ```python
   import adbc_driver_postgres
   import adbc_driver_manager
   
   conn = adbc_driver_manager.connect(adbc_driver_postgres, ...)
   ```
   
   in which case, I think that's reasonable too.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #53:
URL: https://github.com/apache/arrow-adbc/issues/53#issuecomment-1228935396

   Updated #57 with the suggestion, so now you can `adbc_driver_postgres.dbapi.connect()`.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] pitrou commented on issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
pitrou commented on issue #53:
URL: https://github.com/apache/arrow-adbc/issues/53#issuecomment-1227479496

   Actually, I was expecting something like:
   ```python
   import adbc_postgres
   
   conn = adbc_postgres.connect(...)
   ```
   
   (which is also less boilerplate, even though there may still be a `adbc_driver_manager` under the hood)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] pitrou commented on issue #53: [Python] Driver distribution

Posted by GitBox <gi...@apache.org>.
pitrou commented on issue #53:
URL: https://github.com/apache/arrow-adbc/issues/53#issuecomment-1227472745

   Is an entrypoint actually needed? In Python you just need to expose a compatible API and let people do duck typing. Registries only tend to make things more complicated and less flexible.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org