Title: Cannot inherit interfaces that inherit from interfaces with methods · Issue #2524 · pythonnet/pythonnet · GitHub
Open Graph Title: Cannot inherit interfaces that inherit from interfaces with methods · Issue #2524 · pythonnet/pythonnet
X Title: Cannot inherit interfaces that inherit from interfaces with methods · Issue #2524 · pythonnet/pythonnet
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 f...
Open Graph 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)...
X 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)...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2524
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot inherit interfaces that inherit from interfaces with methods","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.4\r\n- Python version: 3.8.10\r\n- Operating System: Ubuntu 2020.04\r\n- .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)\r\n\r\n### Details\r\n\r\nPython classes cannot inherit from C# interfaces that themselves inherit from C# interfaces with methods:\r\n\r\n```cs\r\nnamespace A\r\n{\r\n public interface B\r\n {\r\n void C();\r\n }\r\n\r\n public interface D : B\r\n {\r\n }\r\n}\r\n```\r\n\r\n```python\r\nimport clr\r\n\r\nclr.AddReference('A')\r\nimport A\r\n\r\nclass E(A.D):\r\n __namespace__ = 'F'\r\n```\r\n\r\nOutput:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 6, in \u003cmodule\u003e\r\nTypeError: Failed to create Python type for F.E\r\n```\r\n\r\nExtending from `B` works. It also works if `C` is removed from `B`.\r\n\r\nPossibly related to #2511. Reverting to 3.0.3 (before 9ebfbde3) provides the moderately-more-useful error `TypeError: VTable setup of type F.E failed`.","author":{"url":"https://github.com/sean-anderson-seco","@type":"Person","name":"sean-anderson-seco"},"datePublished":"2024-12-06T23:25:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2524/pythonnet/issues/2524"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:21033a4d-55c1-2f18-06c0-af52ac224d78 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1A8:1D8588:29358:335B4:6971886B |
| html-safe-nonce | 51676fad39f1726757a0b0336af33396ec487d6cd64fd8a1dfcf8be5243df015 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUE4OjFEODU4ODoyOTM1ODozMzVCNDo2OTcxODg2QiIsInZpc2l0b3JfaWQiOiI4MTY3NDcyNjQ2OTM3NzQxNDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d1f64a054dd3e9f2a7cc2cbd1c2d949af16af7dd2d39d385430c8815c760cbeb |
| hovercard-subject-tag | issue:2724123166 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/2524/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b81c31204535c179cdabe1376842303d09a31121ab2f1162a4afbd35bd2164aa/pythonnet/pythonnet/issues/2524 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b81c31204535c179cdabe1376842303d09a31121ab2f1162a4afbd35bd2164aa/pythonnet/pythonnet/issues/2524 |
| og:image:alt | 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)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sean-anderson-seco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b0f2f00499ad3dd2c21ad030a3c403edca54df20ea256f6517c6d8c4fa3a1a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 67235153f3c1514ed5f7dc469f138abc377bd388 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width