Add support for postgresql+psycopg
as allowed scheme to use with PostgreDsn
#4689
Closed
3 of 13 tasks
Labels
Initial Checks
Description
SQLAlchemy 2.0 (currently in beta) now supports psycopg (a.k.a. psycopg3).
This was introduced as a new dialect by the following commit:
sqlalchemy/sqlalchemy@5eb407f
The connection string appears to be
postgresql+psycopg://user:password@host:port/dbname[?key=value&key=value...]
but unfortunately it is not recognized by pydantic as a valid scheme byPostgresDsn
fromnetworks.py
.Would it be possible to add it as an allowed scheme for PostgresDsn?
By looking at the code and while not familiar with cockroachdb, it seems like it would also benefit from this support:
https://www.cockroachlabs.com/docs/stable/build-a-python-app-with-cockroachdb-psycopg3.html
Thanks!
Affected Components
.dict()
and.json()
construct()
, pickling, private attributes, ORM modeThe text was updated successfully, but these errors were encountered: