Benedikt Reinartz

Results 331 comments of Benedikt Reinartz

The exact line that produces this error is https://github.com/pythonnet/pythonnet/blob/22d07ddff8f449d295078ecfebe00fe0ff6e4c74/src/runtime/Types/ClassBase.cs#L281 This is in our `tp_str` implementation (as expected) and can only come from this function returning `null`: https://github.com/pythonnet/pythonnet/blob/22d07ddff8f449d295078ecfebe00fe0ff6e4c74/src/runtime/Types/ManagedType.cs#L17-L33 I put a...

Did you test this in VB.NET? From the compiler output on Godbolt, it doesn't look like the parameter-less constructor is actually created here. We had a bug with older versions...

Look at this: https://godbolt.org/z/xGfT8dexs In the function that "calls" the empty constructor, it just zeros out the stack and returns it. I think that structs just don't have an empty...

Please read the documentation. By default (for backwards-compatibility reasons) a .NET Framework runtime will be loaded, you hav to explicitly load a .NET Core runtime.

You do, sorry, I must have missed that. One other thing you can try is to use `dotnet publish`, apart from that I can have a look next week.

We can't adjust `isinstance` and `issubclass` (which is correct anyhow, one would need to adjust `type(obj)`) without also going back to the "old" behaviour of trying to resolve all fields,...

It's quite un-OOP to just assume that a particular interface might be implemented. If you want to use a property, make sure that the returned interface has that property. You'd...

Yeah, I think I'll prepare a PR for adding functions for this. We should have probably added these right when the change in behaviour happened.

Can you give an example and a testcase for this? If we fail to load types, I'd rather have `clr.AddReference` error out entirely, and it should certainly not write to...