From b6bcc4c4ac4edf65e0d6b6a7b1fa3c6f17a60be6 Mon Sep 17 00:00:00 2001 From: simonjharris <41231349+simonjharris@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:15:55 +0100 Subject: [PATCH 1/4] Cast `top_path` to `Path` in `walk_modules`. --- src/alembic_utils/experimental/_collect_instances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alembic_utils/experimental/_collect_instances.py b/src/alembic_utils/experimental/_collect_instances.py index 0aef5d8..36ba52c 100644 --- a/src/alembic_utils/experimental/_collect_instances.py +++ b/src/alembic_utils/experimental/_collect_instances.py @@ -24,7 +24,7 @@ def walk_modules(module: ModuleType) -> Generator[ModuleType, None, None]: # ... """ top_module = module - top_path = top_module.__path__[0] # type: ignore + top_path = Path(top_module.__path__[0]) directories = ( walk_files(str(top_path)) From bc031fb5c1b308481372edb4a282a8994c815a3b Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Mon, 21 Oct 2024 11:06:25 -0500 Subject: [PATCH 2/4] resolve to full abs path before casting to string --- src/alembic_utils/experimental/_collect_instances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alembic_utils/experimental/_collect_instances.py b/src/alembic_utils/experimental/_collect_instances.py index 36ba52c..713f61b 100644 --- a/src/alembic_utils/experimental/_collect_instances.py +++ b/src/alembic_utils/experimental/_collect_instances.py @@ -27,7 +27,7 @@ def walk_modules(module: ModuleType) -> Generator[ModuleType, None, None]: top_path = Path(top_module.__path__[0]) directories = ( - walk_files(str(top_path)) + walk_files(str(top_path.resolve())) .filter(lambda x: x.endswith(".py")) .map(Path) .group_by(lambda x: x.parent) From 4ef8129b2df5d625cae8bac50b62079696a031b5 Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Mon, 21 Oct 2024 11:11:38 -0500 Subject: [PATCH 3/4] reduce test matrix --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6567fdb..93046ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,8 +7,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] - postgres-version: ['11', '12', '13', '14', '15'] + python-version: ['3.8', '3.11'] + postgres-version: ['13', '14', '15'] sqlalchemy-version: ['1.4', '2.0'] services: From 90751a25568be29a50704771b38177ceb68836d0 Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Mon, 21 Oct 2024 11:12:00 -0500 Subject: [PATCH 4/4] bump version to 0.8.5 --- src/alembic_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alembic_utils/__init__.py b/src/alembic_utils/__init__.py index fa3ddd8..af46754 100644 --- a/src/alembic_utils/__init__.py +++ b/src/alembic_utils/__init__.py @@ -1 +1 @@ -__version__ = "0.8.4" +__version__ = "0.8.5"