Domain reload test cases fixes by BadSingleton · Pull Request #1287 · pythonnet/pythonnet
added 6 commits
November 9, 2020 15:25Serialization of System.Type, MemberInfo and MethodBase is now string based. At deserialization, use reflection to attempt to recreate the object, which may fail safely instead of throwing a SerializaitonException during the deserialization of the whoie data stream. Appropriate Exceptions will now be raised when the Maybe*'s Value property. ClasseBase objects are now de-initialized and re-initialized in Reload mode so that it's tp_dict picks up newly added members and removed members no longer linger. ModuleObject clears it's cache and remove cached members from it's tp_dict. Minor refactoring and modernization of MethodObject and MethodBinder
Changing a type's attribute causes problem with it's cache. Force the type to refresh itself when modifying it.
* Revert line endings change in Python.Runtime.csproj * Split maybe serialize into respective class files * Name changes for consistency
Serialization of System.Type, MemberInfo and MethodBase is now string based. At deserialization, use reflection to attempt to recreate the object, which may fail safely instead of throwing a SerializaitonException during the deserialization of the whoie data stream. Appropriate Exceptions will now be raised when the Maybe*'s Value property. ClasseBase objects are now de-initialized and re-initialized in Reload mode so that it's tp_dict picks up newly added members and removed members no longer linger. ModuleObject clears it's cache and remove cached members from it's tp_dict. Minor refactoring and modernization of MethodObject and MethodBinder
Changing a type's attribute causes problem with it's cache. Force the type to refresh itself when modifying it.
* Revert line endings change in Python.Runtime.csproj * Split maybe serialize into respective class files * Name changes for consistency
Because tp_clear sets tpHandle to NULL, it can't be used. Fortunately, we can simply read object's type from pyHandle.
… engine shutdown (pythonnet#1260) pythonnet#1256 pythonnet#1256 During engine shutdown all links from Python to .NET instances are severed. If an instance of CLR class defined in Python survives the shutdown (for example, a reference is stored in static field) and later gets finalized, it will attempt to severe link again, which is an invalid operation. The fix is to check if the link has already been severed and skip that step during finalization.
This was referenced
Jan 19, 2021This 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