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

pyproject.toml support #1570

Closed
finswimmer opened this issue Mar 17, 2022 · 1 comment
Closed

pyproject.toml support #1570

finswimmer opened this issue Mar 17, 2022 · 1 comment

Comments

@finswimmer
Copy link

finswimmer commented Mar 17, 2022

Hello,

providing configuration of flake8 via pyproject.toml was already requested earlier in #234. Since than the python world has evolved a lot, so I'm asking to rethink this.

Why support pyproject.toml at all?

toml is a standardize format. There are parser out there, so it's trivial for third-party application/libraries to get access to the config if they needed.

My concrete use case is nitpick which allows to have the central place for any kind of configs project should have. While there is support for parsing and writing setup.cfg-like files this becomes quite cumbersome in case of multiline/comma separated values.

In #234 (comment) @asottile said what are blockers for a pyproject.toml support:

pip to change its behaviour so mere presence of the file does not change functionality

The point was about the fact that pip will build a package by default than in an isolated environment, which broke some packages. The only packages that won't build in that case, are those that have build-dependency. That's the exact use case for PEP-518. Packages that need dependencies during build time and haven't specify them in a pyproject.toml are broken and it should be fixed by the maintainer(s).

In the last years the most maintainers have learned about PEP-518 in my experience. It might be due to the raise of Poetry, where those packages will definitely fail to build.

python to consider adding a standard library toml implementation

PEP-680 was accepted recently. So there will be a build-in tomllib from python3.11 on. This will be based on tomli.

Until then I would suggest that pyproject.toml is supported by in extra wich installs this additional dependency. This is how isort introduced it once.

fin swimmer

@sigmavirus24
Copy link
Member

In the future, please search closed and open issues before creating new ones that are duplicates.

@PyCQA PyCQA locked and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants