starlette-context
starlette-context copied to clipboard
Properly use pyproject.toml
The pyproject.toml we use is currently only for black config.
While that's fine and all, pyproject.toml is originally intended to define the build system, and replace setup.cfg
, which itself is already supposed to be a safer alternative to the setup.py
As build system, using the status quo default setuptools is fine for us. But we have to be explicit about it. Latest updates to pip issue a DeprecatedWarning to systems still using setup.py or setup.cfg to define project metadata.
recommended reading:
- https://snarky.ca/what-the-heck-is-pyproject-toml/
- https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
But we have to be explicit about it. Latest updates to pip issue a DeprecatedWarning to systems still using setup.py or setup.cfg to define project metadata.
That's a valid point. I tried to go 100% pyproject.toml many times but many libraries were lacking proper support. I'll try to move everything there after the next release (and ditch setup.py). This deprecation warning is a good enough reason to give it another try.
move everything there
unfortunately I think yapf still does not support configuration through pyproject.toml, so not everything can be moved. but that's fine, we can keep the setup.cfg for that.