Closed AlejandroFNadal closed 2 years ago
The current version of this dialect (v1.1.3) supports SQLA 1.4.
Once SQLAlchemy 2.0 is officially released I planned to abandon any attempt at semver and just release version 2.0.0 of this dialect with the required changes for SQLA 2.0. That is, the major/minor version numbers of this dialect would match those of the SQLA version it supports. That seems to be a more common way for dialects to handle versioning.
SADeprecationWarning: The dbapi() classmethod on dialect classes has been renamed to import_dbapi().
I just made this change in the v_2_wip branch. It will be included in the 2.0 release.
SAWarning: Dialect access:pyodbc will not make use of SQL compilation caching as it does not set the 'supports_statement_cache' attribute to
True
.
was added in 6f95910cd65b5685219c5285d13747c7fae7a864 and included in the version 1.1.2 release. Are you using an older version of this dialect?
Thanks a lot. I installed sqlalchemy-access using pip, but for some reason it installed version 1.0.8. I set up version 1.1.2 in my requirements.txt and did a pip install -r requirements.txt and now these warnings have dissapeared.
I have another question (if it is useful later on, I could set it up as its own issue) I am setting a column with type Date:
date: Mapped[str] = mapped_column(name="Datum", type_ = Date)
However, when reading data from access, I get the type datetime.datetime
MS_Arbrapp.date 2005-01-03 00:00:00 of type <class 'datetime.datetime'>
Is this related to sqlalchemy-access? I could try creating a small reproducible example
All "Date" columns in Access are actually Date/Time columns. (Access does not have a date-only type.) Details here:
Thanks a lot for your reply and the link to SO. It has been very helpful.
Hello everyone
This issue is mostly a question than an actual issue, it might become one though. Does this connector support SQLAlchemy 2.0 or 1.4? (Or both).
I am running this in SQLAlchemy 2.0:
I am getting the following warnings:
The code itself works.
I am willing to put some developing effort as well to help solving this issue with a PR if I get some guidance on how to proceed. If this is a problem of the tool being aimed at sqlalchemy 1.4, should a new sqlalchemy-access be created aimed to sqlalchemy 2.0? Or can this be done inside a single project checking for the version?
Thanks a lot for everyone's work Alejandro