8000 Fix missing **kwargs in adbc_driver_duckdb.dbapi.connect() · Issue #16638 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix missing **kwargs in adbc_driver_du 8000 ckdb.dbapi.connect() #16638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
davlee1972 opened this issue Mar 13, 2025 · 0 comments
Open
1 of 2 tasks

Fix missing **kwargs in adbc_driver_duckdb.dbapi.connect() #16638

davlee1972 opened this issue Mar 13, 2025 · 0 comments
Labels
PR submitted A pull request was submitted to fix the issue

Comments

@davlee1972
Copy link
Contributor
davlee1972 commented Mar 13, 2025

What happens?

Fixed missing **kwargs. Without kwargs connect() isn't following the adbc connect() standard and can't support additional options like autocommit..

>>> c = connect(autocommit=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: connect() got an unexpected keyword argument 'autocommit'

Pull Request with code fix: #16637

To Reproduce

connect() error.

>>> import adbc_driver_duckdb
>>> import adbc_driver_manager
>>> import adbc_driver_manager.dbapi
>>>
>>>
>>> def connect(path: str = None):
...     """Connect to DuckDB via ADBC."""
...     db = None
...     conn = None
...     try:
...         db = adbc_driver_duckdb.connect(path)
...         conn = adbc_driver_manager.AdbcConnection(db)
...         return adbc_driver_manager.dbapi.Connection(db, conn)
...     except Exception:
...         if conn:
...             conn.close()
...         if db:
...             db.close()
...         raise
...
>>> c = connect(autocommit=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: connect() got an unexpected keyword argument 'autocommit'

OS:

All

DuckDB Version:

1.2

DuckDB Client:

Python

Hardware:

No response

Full Name:

David Lee

Affiliation:

BlackRock

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have not tested with any build

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR submitted A pull request was submitted to fix the issue
Projects
None yet
Development

No branches or pull requests

3 participants
0