From 0045ec6267200409c21d8a93a394b7b832cba0cd Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 23 Jan 2024 01:23:03 +0100 Subject: [PATCH 1/2] Python: Fix deprecation/removal of `pandas._testing.makeTimeDataFrame` --- by-language/python-sqlalchemy/insert_dask.py | 2 +- by-language/python-sqlalchemy/insert_pandas.py | 4 ++-- by-language/python-sqlalchemy/requirements-dev.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/by-language/python-sqlalchemy/insert_dask.py b/by-language/python-sqlalchemy/insert_dask.py index 935f6952..65a60aa1 100644 --- a/by-language/python-sqlalchemy/insert_dask.py +++ b/by-language/python-sqlalchemy/insert_dask.py @@ -15,8 +15,8 @@ """ import dask.dataframe as dd from dask.diagnostics import ProgressBar -from pandas._testing import makeTimeDataFrame from crate.client.sqlalchemy.support import insert_bulk +from pueblo.testing.pandas import makeTimeDataFrame DBURI = "crate://localhost:4200" diff --git a/by-language/python-sqlalchemy/insert_pandas.py b/by-language/python-sqlalchemy/insert_pandas.py index 353ee471..e86ca586 100644 --- a/by-language/python-sqlalchemy/insert_pandas.py +++ b/by-language/python-sqlalchemy/insert_pandas.py @@ -50,9 +50,9 @@ import colorlog import sqlalchemy as sa from colorlog.escape_codes import escape_codes -from pandas._testing import makeTimeDataFrame - from crate.client.sqlalchemy.support import insert_bulk +from pueblo.testing.pandas import makeTimeDataFrame + logger = logging.getLogger(__name__) diff --git a/by-language/python-sqlalchemy/requirements-dev.txt b/by-language/python-sqlalchemy/requirements-dev.txt index 4a85dc9c..d5a1635c 100644 --- a/by-language/python-sqlalchemy/requirements-dev.txt +++ b/by-language/python-sqlalchemy/requirements-dev.txt @@ -1,2 +1,3 @@ pytest<8 pytest-cov<5 +pueblo @ git+https://github.com/pyveci/pueblo.git@pandas-testing From 10a5c58877f8b16ab59cef68453d942931c1445d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 23 Jan 2024 21:13:01 +0100 Subject: [PATCH 2/2] Python: Downgrade to CrateDB 5.5.3, more recent releases stall on GHA --- .github/workflows/test-python-sqlalchemy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-python-sqlalchemy.yml b/.github/workflows/test-python-sqlalchemy.yml index 3ee2dd58..9f8a66bc 100644 --- a/.github/workflows/test-python-sqlalchemy.yml +++ b/.github/workflows/test-python-sqlalchemy.yml @@ -38,11 +38,11 @@ jobs: matrix: os: [ 'ubuntu-latest' ] python-version: [ '3.11', '3.12' ] - cratedb-version: [ 'nightly' ] + cratedb-version: [ '5.5.3' ] services: cratedb: - image: crate/crate:nightly + image: crate/crate:${{ matrix.cratedb-version }} ports: - 4200:4200 - 5432:5432