unstale

pypi / pytest-django

pytest-django

What changed in pytest-django 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-27.

1 breaking2 new APIs and options5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

pytest-django 48 changes

Breaking changes 1

New APIs and options 2

  • The django extra lets the dependency resolver select a pytest-django version compatible with the installed Django version, using a lower bound only.

    4.14.0release notes

  • The top-level pytest_django module now exports Settings so the settings fixture can be type-annotated.

    4.13.0release notes

Fixes and other changes 5

  • Unofficial support for Django 5.0 and Django 5.1 has been restored.

    4.14.0release notes

  • Type hints for assert methods now match their actual signature.

    4.13.0release notes

  • django_db(transaction=True) tests are no longer set up twice, preventing repeated serialized_rollback restores and fixture loads, and duplicate signals when available_apps is set.

    4.13.0release notes

  • When the configured settings module cannot be imported, Django 6.2’s ImproperlyConfigured is handled in addition to ImportError so pytest-django still shows its guidance message.

    4.13.0release notes

  • Django is now set up before initial conftests load when --help or --version is passed, avoiding AppRegistryNotReady failures when conftest.py imports Django models at the top level.

    4.13.0release notes