FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Binding options by koubaa · Pull Request #23 · ansys/ansys-pythonnet · GitHub

Repository navigation

Binding options - #23

Merged
koubaa merged 5 commits into
mainfrom
binding-options
Jan 14, 2025
Merged

koubaa merged 5 commits into
mainfrom
binding-options

Conversation

koubaa commented Jan 13, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

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)

koubaa commented Jan 13, 2025

Copy link
Copy Markdown
Collaborator Author

@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?

RobPasMue commented Jan 13, 2025 •
edited
Loading

Copy link
Copy Markdown
Member

Looks like your implementation is getting "activated" somehow even if the user doesn't opt-in? https://github.com/ansys/ansys-pythonnet/actions/runs/12750835469/job/35536486536?pr=23#step:11:75

The failing tests talk about internal properties being accessed. The tests are expected to raise an error because the user shouldn't be able to access them but now, with your implementation, they are accessible by default and do not raise an error.

Copy link
Copy Markdown
Contributor

I'll try to reproduce that locally and come back once I'm done :)

Copy link
Copy Markdown
Contributor

@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.

koubaa commented Jan 14, 2025

Copy link
Copy Markdown
Collaborator Author

@RobPasMue @SMoraisAnsys @dipinknair this is ready for review

RobPasMue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

koubaa commented Jan 14, 2025

Copy link
Copy Markdown
Collaborator Author

@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?

Copy link
Copy Markdown
Member

@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.

Comment thread README.rst
koubaa merged commit c5f9793 into main Jan 14, 2025
koubaa deleted the binding-options branch January 14, 2025 14:36
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IronPython compatibility issue - explicit interface implementation

3 participants


Back | FazBrowse Home | New Git URL