This release has a many optimization improvements, and scalability improvements, while also adding new features, with also some important bug fixes.
Fix, hard module name lookups leaked a reference to that object. Fixed in 0.8.1 already.
Python2: Fix, str.decode
with errors
as the only argument wasn’t working. Fixed in 0.8.1 already.
Fix, could corrupt created uncompiled class objects __init__
functions in case of descriptors being used.
Standalone: Added support for newer torch
. Fixed in 0.8.1 already.
Standalone: Added support for newer torchvision
. Fixed in 0.8.1 already.
Fix, could compile time crash during initial parsing phase on constant dictionary literals with non-hashable keys.
dict.py
Fix, hard imported sub-modules of hard imports were falsely resolved to their parent. Fixed in 0.8.3 already.
importlib.py
Windows: Fix, outputs with --force-stdout-spec
or --force-stderr-spec
were created with the file system encoding on Python3, but they nee to be utf-8
.
Fix, didn’t allow zero spaces in Nuitka project options, which is not expected.
Modules: Fix, the del __file__
in the top level module in module mode caused crashes at run time, when trying to restore the original __file__
value, after the loading CPython corrupted it.
Python2.6: Fixes for installations without pkg_resources
.
Windows: Fix for very old Python 2.6 versions, these didn’t have a language assigned that could be used.
Security: Fix for CVE-2022-2054 where environment variables used for transfer of information between Nuitka restarting itself, could be used to execute arbitrary code at compile time.
Anaconda: Fix, the torch plugin was not working on Linux due to missing DLL dependencies.
Fix, static optimization of importlib.import_module
with a package given, for an absolute import was optimized into the wrong import, package was not ignored as it should be.
Windows: Installed Python scan could crash on trying installation paths from registry that were manually removed in the mean time, but not through an uninstaller.
Standalone: Added missing implicit dependency for pyreadstat
because parts of standard library it uses are no more automatically included.
Windows: Could still crash when no powershell
is available with symlinks, handle this more gracefully.
Standalone: Added more missing Plotly dependencies, but more work will be needed to complete this.
Standalone: Add missing stdlib dependency on multiprocessing
by concurrent.futures.process
.
Standalone: Fix, implicit dependencies assigned to imageio
on PIL plugins should actually be assigned to PIL.Image
that actually loads them, so it works outside of imageio
too.
--user-package-configuration-file
to allow users to provide extra Yaml configuration files for the Nuitka plugin mechanism to add hidden dependencies, anti-bloat, or data files, for packages. This will be useful for developing PRs to the standard file of Nuitka. Currently the schema is available, but it is not documented very well yet, so not really ready for end users just yet.no-qt
plugin as an easy way to prevent all of the Qt bindings from being included in a compilation.PyDict_Next
that avoids the DLL call overhead (in case of non-static libpython) and does less unnecessary checks.str.count
and str.format
methods as well, this should help in some cases with compile time optimization.dict.update
with only an iterable argument, but no keyword arguments, was in fact unused due to wrongly generated code. Also the form with no arguments wasn’t yet handled properly.x = y
in e.g. dictionary creations. With constant keys, and values, these avoid full constant value nodes, and therefore save memory and compile time for a lot of code.pkg_resources.require
, pkg_resources.get_distribution
, importlib.metadata.version
, and importlib_metadata.version
, so we can use compile time optimization to resolve their argument values where possible.__del__
will not execute outside code ever, so this then avoids marking values as escaped, and taking the time to do so.str
, dict
, bytes
that have dedicated nodes are now also optimized through variables.TYPE_CHECKING
coming from a from typing import TYPE_CHECKING
statement to be optimized, avoiding this overhead.torch
plugin to Yaml based configuration, making it obsolete, it only remains there for a few releases, to not crash existing build scripts.pkg-resources
plugin work. This is now done during optimization phase and rather than being based on source code matches, it uses actual value tracing, so it immediately covers many more cases.check-nuitka-with-yamllint
which is now slightly misnamed. The schema is in no way final and will see improvements in future releases.core.autocrlf
setting, as it interferes with auto-format enforcing Unix newlines.PYTHONPATH
now that module presence influences optimization.This release marks a point, that will allow us to open up the compatibility work for implicit dependencies and anti-bloat stuff even further. The Yaml format will need documentation and potentially more refinement, but will open up a future, where latest packages can be supported with just updating this configuration.
The scalability improvements really make a difference for many libraries and are a welcome improvement on both memory usage and compile time. They are achieved by an accord of static optimization of
One optimization aimed at optimizing tuple unpacking, was not finished in time for this release, but will be subject of a future release. It has driven many other improvements though.
Generally, also from the UI, this is a huge step forward. With links to the website for complex topics being started, and the progress bar flicker being removed, the tool has yet again become more user friendly.