inspect: gate behind experimental-inspect
feature
#2882
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the last thing I want to do before preparing 0.18 release.
The
pyo3::inspect
functionality looks useful as a first step towards #2454. However, we don't actually make use of this anywhere within PyO3 yet (we could probably use it for better error messages). I think we also have open questions about the traits which I'd like to resolve before committing to these additional APIs. (For example, this PR addsIntoPy::type_output
, which seems potentially misplaced to me, thetype_output
function probably wants to be on a non-generic trait e.g.ToPyObject
or maybe #2316.)As such, I propose putting these APIs behind an
experimental-inspect
feature gate for now, and invite users who find them useful to contribute a finished-off design.