-
Notifications
You must be signed in to change notification settings - Fork 418
Must use dsn to create connections on Windows #184
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? No Sign in to your account
Comments
That shouldn't be the case. There are tests, and they pass on Windows. Do you mind providing a code snippet that doesn't work for you?
The line you highlighted is the Unix socket connection, and should not be reached on Windows, if you provided the hostname correctly. |
It appears not passing the |
That does seem like a bug. |
… set When the host is not passed explicitly to `connect()`, asyncpg tries to find a suitable socket in a few known directories. On Windows, where there are no file sockets, we should connect directly to 'localhost' instead. Fixes: #184.
… set When the host is not passed explicitly to `connect()`, asyncpg tries to find a suitable socket in a few known directories. On Windows, where there are no file sockets, we should connect directly to `localhost` instead. Fixes: #184.
… set When the host is not passed explicitly to `connect()`, asyncpg tries to find a suitable socket in a few known directories. On Windows, where there are no file sockets, we should connect directly to `localhost` instead. Fixes: #184.
… set When the host is not passed explicitly to `connect()`, asyncpg tries to find a suitable socket in a few known directories. On Windows, where there are no file sockets, we should connect directly to `localhost` instead. Fixes: #184.
With either
asyncpg.connect
orasyncpg.create_pool
, you must passdsn
, and cannot pass host/port/user/password/etc as args.I feel this should be mentioned in the docs or amended.
My personal solution would be a system check or try/
except NotImplementedError
here and fall back toloop.create_connection
.The text was updated successfully, but these errors were encountered: