question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move from setup.cfg to pyproject.toml

See original GitHub issue

Discussed on #313.

Apparently black only supports pyproject.toml, while I always use make format and therefore don’t care about where config is defined, we should make pydantic as easy for others to develop as possible.

Are there any downsides to pyproject.toml?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

14reactions
tiangolocommented, Nov 26, 2018

Just to add my 2 cents about choosing a new build tool, and the differences between Flit and Poetry, from what I have found about all this.

I haven’t even developed a personal preference yet, but as it was a bit confusing for me, here’s a summary of what I have found.


  • pipenv was developed with a file Pipfile (also in TOML format) to replace venv and requirements.txt at the same time. It was adopted and endorsed by PyPA (Python Package Authority, the guys that run PyPI).

  • They wrote the PEP about pyproject.toml, it is the new “standard” file by PyPA). It’s supposed to be an alternative comparable to setup.py and setup.cfg. Not to “deprecate” them necessarily, but to make them optional. As everything is declared in a simpler configuration file, it’s supposed to centralize and simplify package configuration.

  • Poetry and Flit both use the same pyproject.toml file, but in a slightly different way.

  • Flit uses it as it was intended, and so it’s endorsed by PyPA, to do project building and publishing. Nothing else.

  • Poetry uses the same file to handle package building and publishing but also puts development dependencies in there. And it also handles development virtual environments. So, it intends to replace setup.py, setup.cfg but also Pipfile (and with that requirements.txt). And to replace venv and pipenv as commands. More like npm does in the JavaScript world. Everything is done with npm and there’s a single package.json file.

  • Poetry creator and PyPA guys even had some arguments about all the subject.

  • Flit seems to be more “standard” and “endorsed”, but Poetry seems to be more popular.

  • With Flit, the pyproject.toml file would only be replacing setup.py and setup.cfg, but Flit wouldn't care if you use requirements.txt, Pipfile` or anything else for development. It would only care about package building.

7reactions
lsorbercommented, Jul 28, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Transition your Python project to use pyproject.toml and setup ...
Transition your Python project to use pyproject.toml and setup.cfg! (An example.) · configuration files are better than scripts · a few standard ...
Read more >
Issues - GitHub
cfg and move all project metadata and packaging/buiding to pyproject.toml . Here are some related resources I found on the internet: PEPs. PEP ......
Read more >
Understanding setup.py, setup.cfg and pyproject.toml in Python
This blog post is designed to clarify my thinking around installing Python packages and the use of setup.py, setup.cfg and pyproject.toml ...
Read more >
Configuring setuptools using pyproject.toml files
Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata. Setuptools has adopted this standard ...
Read more >
Migration from setup.py to pyproject.toml - Stack Overflow
I'm currently trying to move our internal projects away from setup.py to pyproject.toml (PEP-518). I'd like to not use build backend ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found