- Notifications
You must be signed in to change notification settings - Fork750
allow .NET classes to override __getattr__ and __setattr__#901
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Looks like .csproj files have varying line endings. Do you guys know how to enforce them in the future? |
@filmor any idea why that change could have broken x86 tests? I just tried to run Python.EmbeddingTest on Windows with x86, and did not get any crashes or issue? Could it be, that a simple rerun needed (then how to do it?)? |
filmor commentedJun 28, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It looks good now. Regarding the line endings: IMO we should always have Unix style line-endings everywhere. We could set up a I use the setting |
@filmor I don't think it does. x86 builds are still failing in appveyor (unlike, for example, trivial C# version change). |
Damn, Hyper-V on Windows 10 does not boot x86 linuxes (tried Ubuntu 16.04, 18.04 and the latest Debian) |
…ests crashing under x86 (opened bugpythonnet#946)
Closing this out, as we decided on ad-hoc approach instead (e.g. one should simply have a |
Uh oh!
There was an error while loading.Please reload this page.
What does this implement/fix? Explain your changes.
This enables .NET classes to override
__getattr__
and__setattr__
by implementingIGetAttr
andISetAttr
interfaces correspondingly.How does it work
When constructing a Python type, that will represent C# type, if the C# type implements one of the interfaces, fill corresponding slots in the Python type with custom handlers for
tp_getattro
ortp_setattro
with implementations fromslots.cs
.Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG
P.S.
This is a single-commit change. Probably could be cherry-picked merged without a merge commit.