edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
368 stars 44 forks source link

fix ipv6 connection issues #491

Closed zachary822 closed 4 months ago

zachary822 commented 5 months ago

Addresses #486

Uses socket.getaddrinfo to get address family from provided host and port for the blocking client. This addresses the previous issue that only ipv4 clients were allowed.

edgedb-cla[bot] commented 5 months ago

All commit authors signed the Contributor License Agreement.
CLA signed

cmr-a commented 4 months ago

I tested this. I was able to connect to a remote edgedb instance over ipv6 with these changes. Thanks for the PR!

fantix commented 4 months ago

Thanks for the PR! However, I think we should try to connect to all resolved addresses and use the first one that succeeded, in the same way as asyncio does. I submitted #499 (with your commit) to also fix IPv6.