pythonnet v1.0.0-beta.4 Release Notes

  • ๐Ÿ”„ Changed

    • ๐Ÿ›  Fixed a problem that made it impossible to override "special" methods like __getitem__ in subclasses of managed classes. Now the tests all pass, and there is much rejoicing.

    • Managed classes reflected to Python now have an __doc__ attribute that contains a listing of the class constructor signatures.

    • ๐Ÿ›  Fixed a problem that prevented passing null (None) for array arguments.

    • โœ… Added a number of new argument conversion tests. Thanks to Laurent Caumont for giving Python for .NET a good workout with managed DirectX.

    • โšก๏ธ Updated the bundled C Python runtime and libraries to Python 2.4. The current release is known to also run with Python 2.3. It is known not to work with older versions due to changes in CPython type object structure.

    • ๐Ÿ›  Mostly fixed the differences in the way that import works depending on whether you are using the bundled interpreter or an existing Python interpreter. The hack I used makes import work uniformly for imports done in Python modules. Unfortunately, there is still a limitation when using the interpreter interactively: you need to do import CLR first before importing any sub-names when running with an existing Python interpreter.

      The reason is that the first import of CLR installs the CLR import hook, but for an existing interpreter the standard importer is still in control for the duration of that first import, so sub-names won't be found until the next import, which will use the now-installed hook.

    • ๐Ÿ‘ Added support to directly iterate over objects that support IEnumerator (as well as IEnumerable). Thanks to Greg Chapman for prodding me ;)

    • Added a section to the README dealing with rebuilding Python for .NET against other CPython versions.

    • ๐Ÿ›  Fixed a problem with accessing properties when only the interface for an object is known. For example, ICollection(ob).Count failed because Python for .NET mistakenly decided that Count was abstract.

    • ๐Ÿ›  Fixed some problems with how COM-based objects are exposed and how members of inherited interfaces are exposed. Thanks to Bruce Dodson for patches on this.

    • Changed the Runtime class to use a const string to target the appropriate CPython dll in DllImport attributes. Now you only have to change one line to target a new Python version.