Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black config in pyproject.toml file breaks tox #1523

Closed
meshy opened this issue Feb 14, 2020 · 2 comments
Closed

Black config in pyproject.toml file breaks tox #1523

meshy opened this issue Feb 14, 2020 · 2 comments
Labels
bug:normal affects many people or has quite an impact

Comments

@meshy
Copy link

meshy commented Feb 14, 2020

Tox version: 3.14.4

pyproject.toml:

[tool.black]

skip-string-normalization = true
skip-numeric-underscore-normalization = true

Unexpected error:

ERROR: pyproject.toml file found.
To use a PEP 517 build-backend you are required to configure tox to use an isolated_build:
https://tox.readthedocs.io/en/latest/example/package.html

As you can see, I'm not using a PEP517 build backend, so this was a little unexpected!

@meshy meshy added the bug:normal affects many people or has quite an impact label Feb 14, 2020
@gaborbernat
Copy link
Member

gaborbernat commented Feb 14, 2020

This is expected though. There have been long topics on pip tracker about this, but in essence once you create pyproject.toml you opt in to the new style build system, see https://www.python.org/dev/peps/pep-0518/ and https://www.python.org/dev/peps/pep-0517/. And by opting-in, you are required to specify the required arguments for the system. Black decided to use pyproject.toml as a configuration file, which is allowed but all users using it are also enforced to switch to the new style build system. Which is a best practice by now so there's no harm in doing so. The error message clearly states this, you're required to specify those arguments.

@meshy
Copy link
Author

meshy commented Feb 14, 2020

Gotcha -- OK thanks.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

2 participants