pypa / pyproject-hooks

A low-level library for calling build-backends in `pyproject.toml`-based project
https://pyproject-hooks.readthedocs.io/
MIT License
122 stars 49 forks source link

Enable forwarding warnings from subprocess to the caller #157

Open pradyunsg opened 1 year ago

pradyunsg commented 1 year ago

This would be a reasonable mechanism to surface deprecation/build-related warnings from underlying build-backends to the build-frontends, which can then surface them to users appropriately.

This would likely involve some way to capture and communicate the log messages back to the calling process; ideally with the ability to show the warnings without waiting for the end of the build-backend subprocess.

pradyunsg commented 1 year ago

To be clear, I'm thinking of warnings.warn-style warnings.

pradyunsg commented 1 year ago

FYI: I've started exploring implementing this and figuring out what this should look like.

pradyunsg commented 1 year ago

Adding a x-ref to https://discuss.python.org/t/adding-a-mechanism-to-forward-user-facing-information-from-build-backends-to-build-frontends/28106 where this approach will (hopefully) be discussed more broadly.