- Notifications
You must be signed in to change notification settings - Fork768
RawProxyEncoder#1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
RawProxyEncoder#1122
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Now Python host can force raw encoding for autoconverted .NET types.Enables workaround forpythonnet#514
a0fed9a to213afb6CompareNow Python host can force raw encoding for autoconverted .NET types.Enables workaround forpythonnet#514
codecov-commenter commentedSep 1, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #1122 +/- ##======================================= Coverage 86.66% 86.66% ======================================= Files 1 1 Lines 300 300 ======================================= Hits 260 260 Misses 40 40
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading.Please reload this page.
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 overrideCanEncodeto returnTruefor 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.
AUTHORSCHANGELOG