Nuitka v0.6.8 Release Notes

Release Date: 2020-05-11 // over 4 years ago

Previous changes from v0.6.5

  • ๐Ÿš€ This release contains many bug fixes all across the board. There is also ๐Ÿ†• new optimization and many organisational improvements.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Python3.4+: Fixed issues with modules that exited with an exception, that could lead to a crash, dealing with their __spec__ value.

    • Python3.4+: The __loader__ method is_package had the wrong signature.

    • Python3.6+: Fix for async with being broken with uncompiled generators.

    • Python3.5+: Fix for coroutines that got their awaited object closed behind their back, they were complaining with RuntimeError should they be closed themselves.

    • ๐Ÿ›  Fix, constant values None in a bool target that could not be optimized away, lead to failure during code generation.

    .. code-block:: python

    if x() and None:
      ...
    
    • ๐Ÿ“ฆ Standalone: Added support for sha224, sha384, sha512 in crypto package.

    • ๐Ÿ Windows: The icon wasn't properly attached with MinGW64 anymore, this was a regression.

    • ๐Ÿ Windows: For compiler outputs, also attempt preferred locale to interpret outputs, so we have a better chance to not crash over MSVC error messages that are not UTF-8 compatible.

    • ๐ŸŽ macOS: Handle filename collisions for generated code too, Nuitka now treats all filesystems for all OS as case insensitive for this purpose.

    • ๐Ÿ‘ป Compatibility: Added support for tolerant del in class exception handlers.

    .. code-block:: python

    class C:
    
      try:
        ...
      except Exception as e:
        del e
    
        # At exception handler exit, "e" is deleted if still assigned
    

    We already were compatible for functions and modules here, but due to the special nature of class variables really living in dictionaries, this was delayed. But after some other changes, it was now possible to solve this TODO.

    • ๐Ÿ‘ Standalone: Added support for Python3 variant of Pmw.

    • ๐Ÿ›  Fix, the NumPy plugin now handles more installation types.

    • ๐Ÿ›  Fix, the qt plugin now handles multiple library paths.

    • ๐Ÿ›  Fix, need libm for some Anaconda variants too.

    • ๐Ÿ›  Fix, left over bytecode from plugins could crash the plugin loader.

    • ๐Ÿ›  Fix, pkgutil.iter_packages is now working for loaded packages.

    ๐Ÿ†• New Features

    • Python3.8: Followed some of the changes and works with beta2 as a Python 3.7, but none of the new features are implemented yet.

    • โž• Added support for Torch, Tensorflow, Gevent, Sklearn, with a new Nuitka plugin.

    • โž• Added support for "hinted" compilation, where the used modules are determined through a test run.

    • โž• Added support for including TCL on Linux too.

    Optimization

    • โž• Added support for the any built-in. This handles a wide range of type shapes and constant values at compile time, while also having optimized C code.

    • Generate code for some CLONG operations in preparation of eventual per expression C type selection, it then will allow to avoid objects in many instances.

    • ๐Ÿ Windows: Avoid creating link libraries for MinGW64 as these have become unnecessary is the mean time.

    • ๐Ÿ“ฆ Packages: Do not export entry points for all included packages, only for the main package name it is importable as.

    Organisational

    • โž• Added support for Visual Studio 2019 as a C compiler backend.

    • ๐Ÿ‘Œ Improved plugin documentation describing how to create plugins for Nuitka even better.

    • โœ… The is now a mode for running the tests called all which will execute all the tests and report their errors, and only fail at the very end. This doesn't avoid wasting CPU cycles to report that e.g. all tests are broken, but it allows to know all errors before fixing some.

    • โž• Added repository for Fedora 30 for download.

    • Ask people to compile hello world program in the Github issue template, because many times, they have setup problems only.

    • Visual Studio Code is now the recommended IDE and has integrated configuration to make it immediately useful.

    • โšก๏ธ Updated internal copy of Scons to 3.1.0 as it incorporates many of our patches.

    • ๐Ÿ”„ Changed wordings for optimization to use "lowering" as the only term to describe an optimization that simplifies.

    Cleanups

    • ๐Ÿ”Œ Plugins: Major refactoring of Nuitka plugin API.

    • ๐Ÿ”Œ Plugins: To locate module kind, use core Nuitka code that handles more cases.

    • ๐Ÿ‘• The test suite runners are also now autoformatted and checked with PyLint.

    • ๐Ÿ‘• The Scons file is now PyLint clean too.

    • ๐Ÿ— Avoid build_definitions.h to be included everywhere, in that it's only used in the main program part. This makes C linter hate us much less for using a non-existent file.

    โœ… Tests

    • ๐ŸŽ Run the tests using Travis on macOS too.

    • โœ… More standalone tests have been properly whitelisting to cover openSSL usage from local system.

    • โœ… Disabled PySide2 test, it's not useful to fail and ignore it.

    • โœ… Tests: Fixups for coverage testing mode.

    • โœ… Tests: Temporarily disable some checks for constants code in reflected tests as it only exposes marshal not being deterministic.

    Summary

    ๐Ÿš€ This release is huge again. Main points are compatibility fixes, esp. on the coroutine side. These have become apparently very compatible now and ๐Ÿ‘ we might eventually focus on making them better.

    Again, GSoC 2019 is also showing effects, and will definitely continue to ๐Ÿš€ do soin the next release.

    Many use cases have been improved, and on an organizational level, the ๐Ÿ‘€ adoption of Visual Studio Code seems an huge improvement to have a well ๐Ÿ”ง configured IDE out of the box too.

    ๐Ÿš€ In upcoming releases, more built-ins will be optimized, and hopefully the specialization of operations will hit more and more code with more of the infrastructure getting there.