Skip to content

Native pyproject.toml configuration #13743

Description

@kieran-ryan

What's the problem this feature will solve?

Provide native support for toml configuration to avail of rich types (and associated editor support), improve alignment across Python tooling; and remove a dependency on two configuration formats (toml & ini) within projects.

Describe the solution you'd like

Native toml support with a standalone pytest.toml and a [tool.pytest] section in pyproject.toml (PEP-518) - with the latter outlined as the intent within pytest configuration documentation.

One might wonder why [tool.pytest.ini_options] instead of [tool.pytest] as is the case with other tools

The reason is that the pytest team intends to fully utilize the rich TOML data format for configuration in the future, reserving the [tool.pytest] table for that. The ini_options table is being used, for now, as a bridge between the existing .ini configuration system and the future configuration format.

Alternative Solutions

Use INI configuration embedded within TOML through the [tool.pytest.ini_options] section within pyproject.toml.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions