Closed
Description
Environment
- Pythonnet version: 3.0.4
- Python version: 3.8.10
- Operating System: Ubuntu 2020.04
- .NET Runtime: Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50 UTC 2020)
Details
Python classes cannot inherit from C# interfaces that themselves inherit from C# interfaces with methods:
namespace A
{
public interface B
{
void C();
}
public interface D : B
{
}
}
import clr
clr.AddReference('A')
import A
class E(A.D):
__namespace__ = 'F'
Output:
Traceback (most recent call last):
File "<stdin>", line 6, in <module>
TypeError: Failed to create Python type for F.E
Extending from B
works. It also works if C
is removed from B
.
Possibly related to #2511. Reverting to 3.0.3 (before 9ebfbde) provides the moderately-more-useful error TypeError: VTable setup of type F.E failed
.
Metadata
Metadata
Assignees
Labels
No labels