Closed rajeee closed 1 year ago
Strange, all tests pass. https://github.com/laughingman7743/PyAthena/actions/runs/6242621017 What version of SQLAlchemy are you using?
https://github.com/laughingman7743/PyAthena/blob/v3.0.7/pyathena/sqlalchemy/base.py#L1108 It seems that an error is occurring with this type hint, so it may be possible to remove this type hint. I don't think the type hint is required.
I'm having this issue with SQLAlchemy 1.4.49.
I have confirmed that the error occurs in SQLAlchemy 1.x. I will fix it.
Awesome, thanks @laughingman7743!
FWIW I found this commit https://github.com/sqlalchemy/sqlalchemy/commit/91501e06a17d873902114275d7149ba24973db6a which alludes to the cause of this issue:
Additionally, to support annotations for methods that make use of
@decorator
,@Generative
etc., modifiedformat_argspec_plus
to no longer return "args", instead returns "grouped_args" which is always grouped and allows return annotations to format correctly.
This seems to be relevant since AthenaDialect.get_view_definition()
is decorated with @sqlalchemy.engine.reflection.cache
.
I get the following error when importing AthenaDialect in version 3.0.7
Version 3.0.6 works fine.