From 8caa15c5f6770f58932787515f0e364ffa529b19 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 10:11:11 +0200 Subject: [PATCH 1/6] Fix deprecated lazy_fixture imports --- frictionless/indexer/__spec__/test_resource.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frictionless/indexer/__spec__/test_resource.py b/frictionless/indexer/__spec__/test_resource.py index 8d7200716e..cbf961634b 100644 --- a/frictionless/indexer/__spec__/test_resource.py +++ b/frictionless/indexer/__spec__/test_resource.py @@ -2,18 +2,19 @@ from frictionless import formats, platform from frictionless.resources import TableResource +from pytest_lazyfixture import lazy_fixture control = formats.sql.SqlControl(table="table") fast_database_urls = [ - pytest.lazy_fixtures("sqlite_url"), - pytest.lazy_fixtures("postgresql_url"), + lazy_fixture("sqlite_url"), + lazy_fixture("postgresql_url"), ] database_urls = fast_database_urls + [ - pytest.lazy_fixtures("mysql_url"), + lazy_fixture("mysql_url"), ] if platform.type != "windows": database_urls += [ - pytest.lazy_fixtures("duckdb_url"), + lazy_fixture("duckdb_url"), ] pytestmark = pytest.mark.skipif( platform.type == "darwin" or platform.type == "windows", From 101eb2d6da5c9230b816ced9b57cf3f41b0fccff Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 10:16:00 +0200 Subject: [PATCH 2/6] Fix import order --- frictionless/indexer/__spec__/test_resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frictionless/indexer/__spec__/test_resource.py b/frictionless/indexer/__spec__/test_resource.py index cbf961634b..5df10bb027 100644 --- a/frictionless/indexer/__spec__/test_resource.py +++ b/frictionless/indexer/__spec__/test_resource.py @@ -1,8 +1,8 @@ import pytest +from pytest_lazyfixture import lazy_fixture from frictionless import formats, platform from frictionless.resources import TableResource -from pytest_lazyfixture import lazy_fixture control = formats.sql.SqlControl(table="table") fast_database_urls = [ From 80995c451c888df0e19a3587afa3609f15fd7e62 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 10:40:31 +0200 Subject: [PATCH 3/6] Fix import syntax --- frictionless/indexer/__spec__/test_resource.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frictionless/indexer/__spec__/test_resource.py b/frictionless/indexer/__spec__/test_resource.py index 5df10bb027..4fa77c9a51 100644 --- a/frictionless/indexer/__spec__/test_resource.py +++ b/frictionless/indexer/__spec__/test_resource.py @@ -1,20 +1,20 @@ import pytest -from pytest_lazyfixture import lazy_fixture +from pytest_lazy_fixtures import lf from frictionless import formats, platform from frictionless.resources import TableResource control = formats.sql.SqlControl(table="table") fast_database_urls = [ - lazy_fixture("sqlite_url"), - lazy_fixture("postgresql_url"), + lf("sqlite_url"), + lf("postgresql_url"), ] database_urls = fast_database_urls + [ - lazy_fixture("mysql_url"), + lf("mysql_url"), ] if platform.type != "windows": database_urls += [ - lazy_fixture("duckdb_url"), + lf("duckdb_url"), ] pytestmark = pytest.mark.skipif( platform.type == "darwin" or platform.type == "windows", From 0fd9604b295261f85995132b85fed78d49057639 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 10:48:15 +0200 Subject: [PATCH 4/6] Set fail-fast to false to detect errors in python versions only --- .github/workflows/general.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/general.yaml b/.github/workflows/general.yaml index caf7022c22..64180f6332 100644 --- a/.github/workflows/general.yaml +++ b/.github/workflows/general.yaml @@ -19,6 +19,7 @@ jobs: if: github.event_name != 'schedule' || github.repository_owner == 'frictionlessdata' runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: From 2e0bad6689f6b2873e9a881c4b83b0718f65bee3 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 10:57:59 +0200 Subject: [PATCH 5/6] Update deprecated np.NaN --- frictionless/formats/pandas/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frictionless/formats/pandas/parser.py b/frictionless/formats/pandas/parser.py index ab7b3389a0..3823640efd 100644 --- a/frictionless/formats/pandas/parser.py +++ b/frictionless/formats/pandas/parser.py @@ -157,7 +157,7 @@ def write_row_stream(self, source: TableResource): # http://pandas.pydata.org/pandas-docs/stable/gotchas.html#support-for-integer-na if value is None and field.type in ("number", "integer"): fixed_types[field.name] = "number" - value = np.NaN + value = np.nan if field.name in source.schema.primary_key: index_values.append(value) else: From 0159f710f8e8b8b7f54c3b953c44afc4621eeb47 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Fri, 23 Aug 2024 12:02:47 +0200 Subject: [PATCH 6/6] Removing no longer needed test dependency --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 011a362302..e6a9394856 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,6 @@ dev = [ "pytest-cov", "pytest-vcr", "pytest-mock", - "pytest-only", "oauth2client", "requests-mock", "pytest-dotenv",