Skip to content

Commit

Permalink
Testing: pandas 2.2 no longer supports SQLAlchemy 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 30, 2024
1 parent ab7b14c commit 272bf18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/crate/client/sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from .compat.api13 import monkeypatch_add_exec_driver_sql
from .dialect import CrateDialect
from .sa_version import SA_1_4, SA_VERSION
from .sa_version import SA_1_4, SA_2_0, SA_VERSION # noqa: F401


if SA_VERSION < SA_1_4:
Expand Down
6 changes: 3 additions & 3 deletions src/crate/client/sqlalchemy/tests/bulk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import sqlalchemy as sa
from sqlalchemy.orm import Session

from crate.client.sqlalchemy.sa_version import SA_VERSION, SA_2_0, SA_1_4
from crate.client.sqlalchemy.sa_version import SA_VERSION, SA_2_0

try:
from sqlalchemy.orm import declarative_base
Expand Down Expand Up @@ -170,7 +170,7 @@ def test_bulk_save_modern(self):
self.assertSequenceEqual(expected_bulk_args, bulk_args)

@skipIf(sys.version_info < (3, 8), "SQLAlchemy/pandas is not supported on Python <3.8")
@skipIf(SA_VERSION < SA_1_4, "SQLAlchemy 1.3 is not supported by pandas")
@skipIf(SA_VERSION < SA_2_0, "SQLAlchemy 1.4 is no longer supported by pandas 2.2")
@patch('crate.client.connection.Cursor', mock_cursor=FakeCursor)
def test_bulk_save_pandas(self, mock_cursor):
"""
Expand Down Expand Up @@ -209,7 +209,7 @@ def test_bulk_save_pandas(self, mock_cursor):
self.assertEqual(effective_op_count, OPCOUNT)

@skipIf(sys.version_info < (3, 8), "SQLAlchemy/Dask is not supported on Python <3.8")
@skipIf(SA_VERSION < SA_1_4, "SQLAlchemy 1.3 is not supported by pandas")
@skipIf(SA_VERSION < SA_2_0, "SQLAlchemy 1.4 is no longer supported by pandas 2.2")
@patch('crate.client.connection.Cursor', mock_cursor=FakeCursor)
def test_bulk_save_dask(self, mock_cursor):
"""
Expand Down
4 changes: 2 additions & 2 deletions src/crate/client/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
crate_host, crate_path, crate_port, \
crate_transport_port, docs_path, localhost
from crate.client import connect
from .sqlalchemy import SA_VERSION, SA_1_4
from .sqlalchemy import SA_VERSION, SA_2_0

from .test_cursor import CursorTest
from .test_connection import ConnectionTest
Expand Down Expand Up @@ -395,7 +395,7 @@ def test_suite():
]

# Don't run DataFrame integration tests on SQLAlchemy 1.3 and Python 3.7.
skip_dataframe = SA_VERSION < SA_1_4 or sys.version_info < (3, 8)
skip_dataframe = SA_VERSION < SA_2_0 or sys.version_info < (3, 8)
if not skip_dataframe:
sqlalchemy_integration_tests += [
'docs/by-example/sqlalchemy/dataframe.rst',
Expand Down

0 comments on commit 272bf18

Please sign in to comment.