From 5d5ede35b3592e531fb5035ac9546a49a1a61b7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:07:28 +0000 Subject: [PATCH 1/3] Chore(deps-dev): Update pandas requirement from <2.2 to <2.3 Updates the requirements on [pandas](https://github.com/pandas-dev/pandas) to permit the latest version. - [Release notes](https://github.com/pandas-dev/pandas/releases) - [Commits](https://github.com/pandas-dev/pandas/compare/0.3.0...v2.2.0) --- updated-dependencies: - dependency-name: pandas dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 61ae5d9..9edd1fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ dependencies = [ 'importlib-metadata; python_version <= "3.9"', "influxdb-client[ciso]<2", "line-protocol-parser<2", - "pandas<2.2", + "pandas<2.3", "psycopg2-binary<3", "SQLAlchemy-Utils<0.42", "yarl<2", From 931d7ce2ff9a4c14c951d737bc13142c40b9d2f5 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 30 Jan 2024 21:25:29 +0100 Subject: [PATCH 2/3] Testing: Pull `makeTimeDataFrame` and `makeMixedDataFrame` from pueblo `pandas._testing.{makeTimeDataFrame,makeMixedDataFrame}` were removed on behalf of pandas 2.2.0. This patch pulls corresponding polyfills from a hostel package. --- influxio/core.py | 3 ++- influxio/testdata.py | 2 +- pyproject.toml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/influxio/core.py b/influxio/core.py index d317325..f277992 100644 --- a/influxio/core.py +++ b/influxio/core.py @@ -4,7 +4,6 @@ from yarl import URL from influxio.model import InfluxDbAdapter, SqlAlchemyAdapter -from influxio.testdata import DataFrameFactory from influxio.util.db import get_sqlalchemy_dialects logger = logging.getLogger(__name__) @@ -51,6 +50,8 @@ def copy(source: str, target: str, progress: bool = False): raise NotImplementedError(f"Data sink not implemented: {target_url}") if source_url.scheme == "testdata": + from influxio.testdata import DataFrameFactory + dff = DataFrameFactory(**source_url.query) df = dff.make(source_url.host) sink.write_df(df) diff --git a/influxio/testdata.py b/influxio/testdata.py index ece9f53..bce9e60 100644 --- a/influxio/testdata.py +++ b/influxio/testdata.py @@ -6,8 +6,8 @@ import numpy as np import pandas as pd -from pandas._testing import makeMixedDataFrame, makeTimeDataFrame from pandas.io.formats.info import DataFrameInfo +from pueblo.testing.pandas import makeMixedDataFrame, makeTimeDataFrame logger = logging.getLogger(__name__) diff --git a/pyproject.toml b/pyproject.toml index 9edd1fe..3a36aa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,7 @@ dependencies = [ "line-protocol-parser<2", "pandas<2.3", "psycopg2-binary<3", + "pueblo>=0.0.7", "SQLAlchemy-Utils<0.42", "yarl<2", ] From 3810b9251a630e23c10c6fc62956852222aba158 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 30 Jan 2024 21:26:27 +0100 Subject: [PATCH 3/3] Chore: Use `pyproject-fmt --keep-full-version`, to reduce noise --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3a36aa6..ecce027 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -217,7 +217,7 @@ format = [ { cmd = "black ." }, # Configure Ruff not to auto-fix (remove!) unused variables (F841) and `print` statements (T201). { cmd = "ruff --fix --ignore=ERA --ignore=F401 --ignore=F841 --ignore=T20 ." }, - { cmd = "pyproject-fmt pyproject.toml" }, + { cmd = "pyproject-fmt --keep-full-version pyproject.toml" }, ] lint = [