pythonnet v2.4.0 Release Notes
Release Date: 2019-05-03 // almost 5 years ago-
โ Added
- ๐ Added support for embedding python into dotnet core 2.0 (NetStandard 2.0)
- ๐ท Added new build system (pythonnet.15.sln) based on dotnetcore-sdk/xplat(crossplatform msbuild). Currently there two side-by-side build systems that produces the same output (net40) from the same sources. After a some transition time, current (mono/ msbuild 14.0) build system will be removed.
- โฌ๏ธ NUnit upgraded to 3.7 (eliminates travis-ci random bug)
- Added C#
PythonEngine.AddShutdownHandler
to help client code clean up on shutdown. - Added
clr.GetClrType
([#432][i432])([#433][p433]) - Allowed passing
None
for nullable args ([#460][p460]) - Added keyword arguments based on C# syntax for calling CPython methods ([#461][p461])
- Catches exceptions thrown in C# iterators (yield returns) and rethrows them in python ([#475][i475])([#693][p693])
- Implemented GetDynamicMemberNames() for PyObject to allow dynamic object members to be visible in the debugger ([#443][i443])([#690][p690])
- ๐ Incorporated reference-style links to issues and pull requests in the CHANGELOG ([#608][i608])
- ๐ Added PyObject finalizer support, Python objects referred by C# can be auto collect now ([#692][p692]).
- Added detailed comments about aproaches and dangers to handle multi-app-domains ([#625][p625])
- ๐ Python 3.7 support, builds and testing added. Defaults changed from Python 3.6 to 3.7 ([#698][p698])
- Added support for C# types to provide
__repr__
([#680][p680])
๐ Changed
- PythonException included C# call stack
- ๐ป Reattach python exception traceback information (#545)
- ๐ PythonEngine.Intialize will now call
Py_InitializeEx
with a default value of 0, so signals will not be configured by default on embedding. This is different from the previous behaviour, wherePy_Initialize
was called instead, which sets initSigs to 1. ([#449][i449]) - ๐จ Refactored MethodBinder.Bind in preparation to make it extensible (#829)
- When calling C# from Python, enable passing argument of any type to a parameter of C# type
object
by wrapping it intoPyObject
instance. ([#881][i881]) - ๐ Look for installed Windows 10 sdk's during installation instead of relying on specific versions.
๐ Fixed
- ๐ Fixed secondary PythonEngine.Initialize call, all sensitive static variables now reseted. This is a hidden bug. Once python cleaning up enough memory, objects from previous engine run becomes corrupted. ([#534][p534])
- ๐ Fixed Visual Studio 2017 compat ([#434][i434]) for setup.py
- ๐ Fixed crashes when integrating pythonnet in Unity3d ([#714][i714]), related to unloading the Application Domain
- Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix. ([#531][p531])
- ๐ Fixed crash on exit of the Python interpreter if a python class
derived from a .NET class has a
__namespace__
or__assembly__
attribute ([#481][i481]) - ๐ Fixed conversion of 'float' and 'double' values ([#486][i486])
- ๐ Fixed 'clrmethod' for python 2 ([#492][i492])
- ๐ Fixed double calling of constructor when deriving from .NET class ([#495][i495])
- ๐ Fixed
clr.GetClrType
when iterating overSystem
members ([#607][p607]) - ๐ Fixed
LockRecursionException
when loading assemblies ([#627][i627]) - ๐ Fixed errors breaking .NET Remoting on method invoke ([#276][i276])
- ๐ Fixed PyObject.GetHashCode ([#676][i676])
- Fix memory leaks due to spurious handle incrementation ([#691][i691])
- Fix spurious assembly loading exceptions from private types ([#703][i703])
- Fix inheritance of non-abstract base methods ([#755][i755])