From 7b2022e5f3f5ee747657cca57aa9bf648ee9c7d9 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Tue, 22 Oct 2024 12:24:51 +0200 Subject: [PATCH] refactor: Move psycopg2 to an optional dependency Moved psycopg2 as an optional dependency for postgres to not block users with lib issues it might cause Refactor #COG-170 --- poetry.lock | 4 ++-- pyproject.toml | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index fc2f8d5d6..d4d52f54b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aiofiles" @@ -7765,4 +7765,4 @@ weaviate = ["weaviate-client"] [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<3.12" -content-hash = "505c4f6f2128aea335ea6065221cf4692750e374f1b09667d250b6f77f3e4b59" +content-hash = "9ce846c0cdd6f980fac43d22ea1f046f485fb42270a5cfe04fed061ea74a4f8c" diff --git a/pyproject.toml b/pyproject.toml index 898ad5708..33b8b6a2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,6 @@ fastapi-users = { version = "*", extras = ["sqlalchemy"] } asyncpg = "^0.29.0" alembic = "^1.13.3" pgvector = "^0.3.5" -psycopg2 = "^2.9.10" @@ -107,6 +106,11 @@ diskcache = "^5.6.3" pandas = "2.0.3" tabulate = "^0.9.0" +[tool.poetry.group.postgres] +optional = true + +[tool.poetry.group.postgres.dependencies] +psycopg2 = "^2.9.10" [tool.ruff] # https://beta.ruff.rs/docs/ line-length = 100