# What changed in aiodns

> 12 changes in aiodns 3 to 4 from its official release notes, upgrade guides and advisories: 1 breaking, 2 deprecations, 1 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/pypi/aiodns/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## aiodns 4

### Breaking changes

- Requires pycares >= 5.0.0, a breaking change for projects using an older version. (4.0.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.0)

### Deprecations

- Deprecated; use getaddrinfo() instead. (4.0.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.0)
- Deprecated; it still works with backward-compatible result types. (4.0.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.0)

### New APIs and options

- Added a method returning native pycares 5.x DNSResult types. (4.0.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.0)

### Fixes and other changes

- Adds the missing build-backend entry to pyproject.toml so PEP 517 builds from the sdist work without falling back to the deprecated legacy setuptools backend. (4.0.4) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.4)
- query() raises DNSError(ARES_ENODATA) when the answer section has no records of the requested qtype, restoring the pycares 4.x NODATA contract and avoiding AttributeError for CNAME/SOA/PTR callers. (4.0.4) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.4)
- Packaging tools again detect aiodns as MIT-licensed. (4.0.3) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.3)
- Fixes “Future exception was never retrieved” when pycares raises AresError synchronously, for example with malformed hostnames. (4.0.1) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.1)
- Added compatibility for pycares 4.x result types to ease migration. (4.0.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v4.0.0)

## aiodns 3

### Performance

- Improves performance for socket state handling. (3.6.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v3.6.0)

### Tooling

- Build configuration prevents incompatible pycares versions. (3.6.1) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v3.6.1)

### Fixes and other changes

- Prevents the resolver from being garbage collected while queries are in progress. (3.6.0) — [release notes](https://github.com/aio-libs/aiodns/releases/tag/v3.6.0)
