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 a325c9b commit 60a3ab5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions 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 sqlalchemy_cratedb import SA_VERSION, SA_2_0, SA_1_4
from sqlalchemy_cratedb 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 tests/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import logging

from crate.client import connect
from sqlalchemy_cratedb import SA_VERSION, SA_1_4
from sqlalchemy_cratedb import SA_VERSION, SA_2_0
from tests.settings import crate_host

log = logging.getLogger()
Expand Down Expand Up @@ -180,7 +180,7 @@ def create_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/dataframe.rst',
Expand Down

0 comments on commit 60a3ab5

Please sign in to comment.