[
https://issues.apache.org/jira/browse/PHOENIX-6892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Istvan Toth updated PHOENIX-6892:
---------------------------------
Summary: Add support for SqlAlchemy 2.0 (was: Python Phoenixdb SqlAlchemy
tests fail with SqlAlchemy 2.0)
> Add support for SqlAlchemy 2.0
> ------------------------------
>
> Key: PHOENIX-6892
> URL: https://issues.apache.org/jira/browse/PHOENIX-6892
> Project: Phoenix
> Issue Type: Bug
> Components: python, queryserver
> Affects Versions: python-phoenixdb-1.2.1
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> Let's hope we can fix this without breaking SqlAchemy 1.x support
> {noformat}
>
> /home/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/tests/test_sqlalchemy.py:161:
> SADeprecationWarning: The dbapi() classmethod on dialect classes has been
> renamed to import_dbapi(). Implement an import_dbapi() classmethod directly
> on class <class 'phoenixdb.sqlalchemy_phoenix.PhoenixDialect'> to remove this
> warning; the old .dbapi() classmethod may be maintained for backwards
> compatibility.
> return db.create_engine(urlunparse(url_parts), tls=tls,
> connect_args=connect_args)-- Docs:
> https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> ========================================================================================
> short test summary info
> ========================================================================================
> FAILED phoenixdb/tests/test_sqlalchemy.py::SQLAlchemyTest::test_connection -
> TypeError: Additional arguments should be named <dialectname>_<argument>, got
> 'autoload'
> FAILED phoenixdb/tests/test_sqlalchemy.py::SQLAlchemyTest::test_reflection -
> sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: 'drop
> table if exists us_population'
> FAILED
> phoenixdb/tests/test_sqlalchemy.py::SQLAlchemyTest::test_schema_filtering -
> sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: 'drop view
> if exists ALCHEMY_TEST_VIEW'
> FAILED phoenixdb/tests/test_sqlalchemy.py::SQLAlchemyTest::test_textual -
> sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: 'drop
> table if exists ALCHEMY_TEST'
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)