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.
Now Python host can force raw encoding for autoconverted .NET types.
What does this implement/fix? Explain your changes.
This class allows Python to override some automatic conversions done by Python.NET, which was otherwise impossible.
To do that, Python code can define a class derived from
RawProxyEncoder
, and overrideCanEncode
to returnTrue
for the desired types. Create an instance of this class, and register it withPython.Runtime.PyObjectConversions.RegisterEncoder(instance)
(see new test for example)Does this close any currently open issues?
Enables workaround for #514
Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG