Skip to content

fix(dns): Consistently use system DNS by default - #666

Open
rzhikharevich wants to merge 9 commits into
0x676e67:mainfrom
rzhikharevich:rzhikharevich-fix-default-dns
Open

rzhikharevich wants to merge 9 commits into
0x676e67:mainfrom
rzhikharevich:rzhikharevich-fix-default-dns

Conversation

@rzhikharevich

@rzhikharevich rzhikharevich commented Nov 18, 2026 •

Copy link
Copy Markdown

Looks like there's a bug with how the DNS resolver is picked when no kwargs are supplied to wreq.Client (vs. supplying any kwargs, even those unrelated to DNS).

The problem is that there's no else branch for if let Some(mut config) = kwds in Client::build which means that wreq-python defers to what wreq picks by default when kwargs are omitted.

repro.log demonstrates this by setting breakpoints on getaddrinfo and running two scripts.

repro.log

As discussed on Discord, this changes the default to system DNS.

@rzhikharevich
rzhikharevich force-pushed the rzhikharevich-fix-default-dns branch from 26efc53 to 1da3026 Compare November 20, 2026 14:37
@rzhikharevich rzhikharevich changed the title Actually use HickoryResolver by default fix(dns): Consistently use system DNS by default Nov 20, 2026

This branch was successfully deployed

1 active and 2 inactive deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant