Benedikt Reinartz

Results 331 comments of Benedikt Reinartz

There are direct C-API functions to issue warnings: https://docs.python.org/3/c-api/exceptions.html#issuing-warnings

You have to set it yourself, that's how it works in the C-API as well: https://docs.python.org/3/c-api/module.html#c.PyModule_NewObject

Sorry, I just saw your PR (#2044), is this not the same as just setting `__file__` explicitly on the `PyModule` object?

> This interface provides methods to convert the value of an instance of an implementing type to a common language runtime type that has an equivalent value. That is the...

Hmm, actually the example in the docs really looks like `str(obj)` is a valid implementation of `IConvertible.ToString`, see https://learn.microsoft.com/en-us/dotnet/api/system.iconvertible#examples

What is the actual test that you are running here?

Can you please boil this down to a reproducible example? The potentially relevant change is https://github.com/pythonnet/pythonnet/pull/1986, but I can't verify that like this. (As a side note, this way of...

Great, thank you for the example, I'll look into it.

Wow, this is a weird one: The issue is due to the fact that you reference Python.NET 3.0.0 in your project explicitly. This leads to your `RegisterEncoder` call being run...

It's actually enough to just delete the `Python.Runtime.dll` from your lib directory. Instead of doing a manual copy, `dotnet publish` the project to a `lib` directory and reference `pythonnet` like...