Binding options by koubaa · Pull Request #23 · ansys/ansys-pythonnet
Fixes #22
Gives the user an option to opt-into exposing explicit interface implementations.
This is done by adding a place to register customizations for python bindings by type or assembly.
Usage (to customize binding for all types in an assembly):
m = clr.AddReference('TestInheritance')
from Python.Runtime import BindingManager, BindingOptions
binding_options = BindingOptions()
binding_options.AllowExplicitInterfaceImplementation = True
BindingManager.SetBindingOptions(m, binding_options)
Mohamed Koubaa added 2 commits
January 13, 2025 09:27@RobPasMue @dipinknair @SMoraisAnsys
I can't reproduce the CI failures locally and it seems the upgrade to 3.13 didn't have any CI issue. Any ideas?
I'm able to reproduce the CI failure locally and passed main locally. As @RobPasMue mentioned, the implementation is at cause here.
Mohamed Koubaa added 2 commits
January 14, 2025 06:53Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me - should we consider bringing these changes upstream? In any case, I would include in the main README of our fork some info regarding this implementation
@RobPasMue I started to propose the binding manager upstream first. If that is accepted, I can propose the explicit interface implementation option too.
Yes - the readme should be updated. Should we do that on pypi releases or on merges to main?
@RobPasMue I started to propose the binding manager upstream first. If that is accepted, I can propose the explicit interface implementation option too.
Awesome, thanks for handling that!
Yes - the readme should be updated. Should we do that on pypi releases or on merges to main?
I would do it as part of this PR. Our main branch should reflect the change already. We can do a follow up release right after.
koubaa
deleted the
binding-options
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters