pythonnet v2.5.0 Release Notes
Release Date: 2020-06-14 // almost 4 years ago-
๐ > โ ๏ธ This release will be the last one supporting Python 2 and non-.NET-Standard builds.
๐ This version improves performance on benchmarks significantly compared to 2.3 and includes various additions and improvements to the library.
โ Added
- ๐ Automatic NuGet package generation in appveyor and local builds
- Function that sets
Py_NoSiteFlag
to 1. - ๐ Support for Jetson Nano.
- Support for
__len__
for .NET classes that implement ICollection PyExport
attribute to hide .NET types from PythonPythonException.Format
method to format exceptions the same as
traceback.format_exception
Runtime.None
to be able to passNone
as parameter into Python from .NETPyObject.IsNone()
to check if a Python object is None in .NET.- ๐ Support for Python 3.8
- Codecs as the designated way to handle automatic conversions between
.NET and Python types
๐ Changed
- โ Added argument types information to "No method matches given arguments" message
- ๐ Moved wheel import in setup.py inside of a try/except to prevent pip collection failures
- Removes
PyLong_GetMax
andPyClass_New
when targetting Python3 - ๐ Improved performance of calls from Python to C#
- โ Added support for converting python iterators to C# arrays
- ๐ Changed usage of the obsolete function
GetDelegateForFunctionPointer(IntPtr, Type)
to
GetDelegateForFunctionPointer<TDelegate>(IntPtr)
- When calling C# from Python, enable passing argument of any type to a
parameter of C# typeobject
by wrapping it intoPyObject
instance.
([#881][i881]) - โ Added support for kwarg parameters when calling .NET methods from Python
- ๐ Changed method for finding MSBuild using vswhere
- Reworked
Finalizer
. Now objects drop into its queue upon finalization,
which is periodically drained when new objects are created. - Marked
Runtime.OperatingSystemName
andRuntime.MachineName
as
Obsolete
, should never have beenpublic
in the first place. They also
don't necessarily return a result that matches theplatform
module's. - ๐ Unconditionally depend on
pycparser
for the interop module generation
๐ Fixed
- ๐ Fixed runtime that fails loading when using pythonnet in an environment
together with Nuitka - ๐ Fixes bug where delegates get casts (dotnetcore)
- Determine size of interpreter longs at runtime
- Handling exceptions ocurred in ModuleObject's getattribute
- Fill
__classcell__
correctly for Python subclasses of .NET types - ๐ Fixed issue with params methods that are not passed an array.
- ๐ Use UTF8 to encode strings passed to
PyRun_String
on Python 3
Acknowledgements
๐ These authors have contributed to this release: