Fix: Fixes psycopg2 error when pg_config is not installed (#1120)

<!-- .github/pull_request_template.md -->

## 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 <igorilic03@gmail.com>
This commit is contained in:
hajdul88 2025-07-22 09:31:01 +02:00 committed by GitHub
parent 7af7e3834f
commit 4474efade3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 7 deletions

6
poetry.lock generated
View file

@ -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"

View file

@ -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 = [

2
uv.lock generated
View file

@ -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" },