unstale

pypi / pytest-env

pytest-env

What changed in pytest-env 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

1 breaking6 new APIs and options2 behavior and defaults2 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.2.5 on npm

pytest-env 111 changes

Breaking changes 1

  • Python 3.11 is now required, and the default Python version is 3.15.

    1.8.0release notes

New APIs and options 6

  • Adds a flag for debugging environment assignments.

    1.5.0release notes

  • Adds the --envfile option for switching runtime environments.

    1.4.0release notes

  • pytest-env adds support for loading environment variables from .env files.

    1.3.0release notes

  • pytest-env supports pytest.toml and .pytest.toml configuration files.

    1.3.0release notes

  • pytest-env supports configuration in the [tool.pytest] section of pyproject.toml.

    1.3.0release notes

  • The U flag unsets environment variables.

    1.3.0release notes

Behavior and default changes 2

  • Preserves existing environment variable values when pytest-env sets environment variables.

    1.6.0release notes

  • TOML file discovery now uses inipath.

    1.3.0release notes

Fixes and other changes 2

  • An explicitly empty native env_files setting now takes precedence over the INI fallback.

    1.8.1release notes

  • Fixes verbose source attribution when falling back to INI environment variables.

    1.5.1release notes