in 0.4.0 a change was made which no longer sends the connection string as-is to the (asyncpg) backend. Instead, the connection string is parsed using urllib, however, libpq connection strings have more options than standard url connection strings. In particular, a unix socket (which must start with /) can’t seem to be parsed as the hostname. I’ve described the problem in this issue (which I’ve since closed https://github.com/encode/databases/issues/257
I’ve also written a potential fix here, which allows specifying connection string components as options as allowed by the libpq connection string description, as well as using keyword arguments.
Please let me know if you’d like me to make a formal PR