Would it be reasonable for OpenUSD to try to convert TfWarning
into python warning
module warnings if there’s no registered delegate?
There are then multiple facilities in warnings
module for silencing warnings, converting warnings to errors, or converting them to logging
module.
I suspect this could be implemented as a boost python call policy that sets some state on the TfDiagnosticMgr
so that in PostWarning
, instead of _PrintDiagnostic
, PyError_Warn is called instead.