-
Notifications
You must be signed in to change notification settings - Fork 688
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
Object identity, Interfaces and Attributes #2019
base: master
Are you sure you want to change the base?
Object identity, Interfaces and Attributes #2019
Conversation
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
… inside a .NET module.
Added support for specifying attributes on property-methods (eg. get/set attributes).
…eritGenericVirtualMethodFix2
Added a few cleanups and comments.
if (!clsDict.HasKey("__namespace__")) | ||
{ | ||
clsDict["__namespace__"] = | ||
(clsDict["__module__"].ToString()).ToPython(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't introduce breaking changes
Python.Runtime.Runtime.PythonDLL = | ||
"C:\\Python37.2\\python37.dll"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean up the history
/// <summary> | ||
/// Creates a new instance of PythonTypeAttribute. | ||
/// </summary> | ||
/// <param name="pyTypeModule"></param> | ||
/// <param name="pyTypeName"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This XML doc does not have any useful information.
@lostmsu, ok, I understand. I just want to make sure you agree with the intentions here before I spend a lot of work trying to separate things out. What about the support for Attributes and interfaces? Are you ok with adding something like that? Anyway, it sounds like you want #1774 implemented in a specific way? Maybe it is easier that it is not me who develops that then? I'll try to take #1776 and create a separate PR for it. |
This PR contains multiple improvements:
@attribute(Browsable(False))
, or clr_attributes = [Browsable(False), ...]property(Double,0.0).add_attribute(DisplayName("X")
Close #1776, #1774, #1768
Check all those that are applicable and complete.
AUTHORS
CHANGELOG