Skip to content

Commit cd5e42f

Browse files
committed
fix(deps): switch to psycopg3 for Python 3.14 compatibility
psycopg2 is a C extension that requires libpq, which is incompatible with python_abi 3.14 cp314t on conda-forge. psycopg (v3) is a pure Python driver that works on all Python versions. - Replace psycopg2 with psycopg in environment files - Remove postgresql server package (pytest-postgresql manages its own) - Update SQLAlchemy dialect from postgresql+psycopg2 to postgresql+psycopg
1 parent 48518dc commit cd5e42f

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

environment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ dependencies:
1818
- pillow=12.1.1
1919
- pip=26.0.1
2020
- plyvel=1.5.1
21-
- postgresql=17.9
2221
- pre-commit=4.5.1
23-
- psycopg2=2.9.11
22+
- psycopg=3.3.3
2423
- psutil=7.2.2
2524
- pyarrow=23.0.1
2625
- pytest-asyncio=1.3.0

scripts/environment-unpinned.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ dependencies:
1515
- pandas
1616
- pip
1717
- pillow
18-
- postgresql
19-
- psycopg2
18+
- psycopg
2019
- plyvel
2120
- psutil
2221
- pytest-postgresql

test/storage/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def structured_provider(
4949
pg = request.getfixturevalue("postgresql")
5050
info = pg.info
5151
pg_url = (
52-
f"postgresql+psycopg2://{info.user}:{info.password or ''}"
52+
f"postgresql+psycopg://{info.user}:{info.password or ''}"
5353
f"@{info.host}:{info.port}/{info.dbname}"
5454
)
5555
return SQLAlchemyStorageProvider(pg_url)

0 commit comments

Comments
 (0)