Skip to content

1776 inherit generic virtual method fix #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

rmadsen-ks
Copy link
Owner

What does this implement/fix? Explain your changes.

...

Does this close any currently open issues?

...

Any other comments?

...

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Ensure you have signed the .NET Foundation CLA
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

rmadsen-ks and others added 17 commits October 26, 2022 15:24
Added a unit test which consists ofa python class inheriting from a C# class which has a virtual generic method. In this version, this causes a InvalidProgramException to be thrown during class creation.
Previously an exception was thrown during class creation if the python class inherited from a class with a virtual generic method.

This has been fixed by ignoring generic methods when creating overloads in the generated class. Note, this means that generic virtual methods cannot be overridden in python code.
- Changed the behavior so that a .NET is always created when the base type is also a .NET type.
- Added shortened Attribute aliases which just generates tuples.
- More general CLR base class support - creating a class instance from C# is now more similar to creating one from python.
- Added attribute decorator to clr.py.
- Added testing for the various possibilities
- Fixed search bug in AssocAttribute
- Added testing
There are small typos in:
- pythonnet/__init__.py
- tests/test_import.py

Fixes:
- Should read `splitted` rather than `splited`.
- Should read `loaded` rather than `laoded`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
Added support for specifying attributes on property-methods (eg. get/set attributes).
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.

3 participants