pauldex / sqlalchemy-firebird

A Firebird dialect for SQLAlchemy using the firebird-driver and/or fdb python Firebird driver
MIT License
23 stars 15 forks source link

is it right description ? #51

Closed attid closed 1 year ago

attid commented 1 year ago

Describe the bug is it right ?

  # Use the fdb driver (Python 3.6/3.7)
  firebird+fdb://username:password@localhost///home/testuser/projects/databases/my_project.fdb 
  # Use the firebird-driver driver (Python 3.8+)
  firebird+firebird://username:password@localhost///home/testuser/projects/databases/my_project.fdb

i use Python 3.10 and it work with firebird+fdb but i get error with firebird+firebird


  File "//venv3.10/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 637, in connect
    return dialect.connect(*cargs, **cparams)
  File "//venv3.10/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 616, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
TypeError: connect() got an unexpected keyword argument 'host'
alusterax commented 1 year ago

Can confirm, I was having the same error while running on SQLAlchemy==2.0.16, sqlalchemy-firebird==2.0.0 and firebird-driver==1.8.0

fdcastel commented 1 year ago
TypeError: connect() got an unexpected keyword argument 'host'

Fixed in #53.

Related: #52.

attid commented 1 year ago

Is using firebird+firebird with sqlalchemy-firebird in Python 3.10 considered a best practice?

Currently, I have two projects that utilize firebird+fdb, and they are functioning well.

fdcastel commented 1 year ago

Is using firebird+firebird with sqlalchemy-firebird in Python 3.10 considered a best practice?

Yes.

fdb uses a legacy Firebird api and it is in maintenance-only state. It is being kept only for those who still need to connect with Firebird 2.5.

firebird-driver uses the new Firebird 3.0+ api and is the recommended way to access Firebird from Python.

fdcastel commented 1 year ago

@pauldex Could you please release a 2.0.1 with this fix?

TypeError: connect() got an unexpected keyword argument 'host'

Fixed in #53.

Related: #52.

fdcastel commented 1 year ago

Also related: https://github.com/pauldex/sqlalchemy-firebird/issues/56

pauldex commented 1 year ago

Sorry about the delay, but release 2.0.1 is now out with this fix