pythonnet v1.0.0-rc.1 Release Notes
-
๐ Changed
๐ Implemented a workaround for the fact that exceptions cannot be new-style classes in the CPython interpreter. Managed exceptions can now be raised and caught naturally from Python (hooray!)
๐ Implemented support for invoking methods with out and ref parameters. Because there is no real equivalent to these in Python, methods that have out or ref parameters will return a tuple. The tuple will contain the result of the method as its first item, followed by out parameter values in the order of their declaration in the method signature.
๐ Fixed a refcount problem that caused a crash when CLR was imported in an existing installed Python interpreter.
Added an automatic conversion from Python strings to
byte[]
. This makes it easier to passbyte[]
data to managed methods (or set properties, etc.) as a Python string without having to write explicit conversion code. Also works for sbyte arrays. Note thatbyte
andsbyte
arrays returned from managed methods or obtained from properties or fields do not get converted to Python strings - they remain instances ofByte[]
orSByte[]
.Added conversion of generic Python sequences to object arrays when appropriate (thanks to Mackenzie Straight for the patch).
๐ Added a bit of cautionary documentation for embedders, focused on correct handling of the Python global interpreter lock from managed code for code that calls into Python.
PyObject.FromManagedObject
now correctly returns the Python None object if the input is a null reference. Also added a newAsManagedObject
method toPyObject
, making it easier to convert a Python-wrapped managed object to the real managed object.๐ Created a simple installer for windows platforms.