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 pass byte[] 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 that byte and sbyte arrays returned from managed methods or obtained from properties or fields do not get converted to Python strings - they remain instances of Byte[] or SByte[].

    • 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 new AsManagedObject method to PyObject, making it easier to convert a Python-wrapped managed object to the real managed object.

    • ๐Ÿ Created a simple installer for windows platforms.