From 4474efade34a82acd6a9a5e861ffc5b46617385e Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Tue, 22 Jul 2025 09:31:01 +0200 Subject: [PATCH] Fix: Fixes psycopg2 error when pg_config is not installed (#1120) ## Description Fix: Fixes psycopg2 error when pg_config is not installed ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Co-authored-by: Igor Ilic --- poetry.lock | 6 +++--- pyproject.toml | 3 +-- uv.lock | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index 96edccbc4..19b46fd43 100644 --- a/poetry.lock +++ b/poetry.lock @@ -7683,7 +7683,7 @@ description = "psycopg2 - Python-PostgreSQL Database Adapter" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"postgres\" or extra == \"postgres-binary\"" +markers = "extra == \"postgres\"" files = [ {file = "psycopg2-2.9.10-cp310-cp310-win32.whl", hash = "sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716"}, {file = "psycopg2-2.9.10-cp310-cp310-win_amd64.whl", hash = "sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a"}, @@ -12262,7 +12262,7 @@ neo4j = ["neo4j"] notebook = ["notebook"] ollama = ["transformers"] postgres = ["asyncpg", "pgvector", "psycopg2"] -postgres-binary = ["asyncpg", "pgvector", "psycopg2", "psycopg2-binary"] +postgres-binary = ["asyncpg", "pgvector", "psycopg2-binary"] posthog = ["posthog"] qdrant = ["qdrant-client"] weaviate = ["weaviate-client"] @@ -12270,4 +12270,4 @@ weaviate = ["weaviate-client"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<=3.13" -content-hash = "fc071b47dfc4ff9c287d01d5d7f4b67d6486e136caf2f50c6d34a942f9876aa4" +content-hash = "bfd833e6837328c446785f36d71df227f6b783c584442d57c0f408b726f1ebd2" diff --git a/pyproject.toml b/pyproject.toml index 426c442aa..4fa634b7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,10 +79,9 @@ postgres = [ "asyncpg>=0.30.0,<1.0.0", ] postgres-binary = [ - "psycopg2>=2.9.10,<3", + "psycopg2-binary>=2.9.10,<3.0.0", "pgvector>=0.3.5,<0.4", "asyncpg>=0.30.0,<1.0.0", - "psycopg2-binary>=2.9.10,<3.0.0", ] notebook = ["notebook>=7.1.0,<8"] langchain = [ diff --git a/uv.lock b/uv.lock index 1639c905a..06d9bb933 100644 --- a/uv.lock +++ b/uv.lock @@ -1024,7 +1024,6 @@ postgres = [ postgres-binary = [ { name = "asyncpg" }, { name = "pgvector" }, - { name = "psycopg2" }, { name = "psycopg2-binary" }, ] posthog = [ @@ -1095,7 +1094,6 @@ requires-dist = [ { name = "posthog", marker = "extra == 'posthog'", specifier = ">=3.5.0,<4" }, { name = "pre-commit", specifier = ">=4.0.1,<5" }, { name = "psycopg2", marker = "extra == 'postgres'", specifier = ">=2.9.10,<3" }, - { name = "psycopg2", marker = "extra == 'postgres-binary'", specifier = ">=2.9.10,<3" }, { name = "psycopg2-binary", marker = "extra == 'postgres-binary'", specifier = ">=2.9.10,<3.0.0" }, { name = "pydantic", specifier = ">=2.10.5,<3.0.0" }, { name = "pydantic-settings", specifier = ">=2.2.1,<3" },