26 January 2012
Nuitka Release 0.3.19
This is to inform you about the new stable release of Nuitka. It is the extremely compatible Python compiler, “download now”.
This time there are a few bug fixes, major cleanups, more Python3 support, and even new features. A lot things in this are justifying a new release. The man pages of The command line length improvement we made to Scons for Windows was not portable to Python2.6. Released as 0.3.18.2 hot fix already. Code to detect already considered packages detection was not portable to Windows, for one case, there was still a use of A call to the range built-in with no arguments would crash the compiler, see Released as 0.3.18.4 already. Compatibility Fix: When rich comparison operators returned false value other The support for A new option has been added, one can now specify Added support for the The no arguments Parts of comparison chains with constant arguments are now optimized away. Simplified the If there are more, the so called “comparison chain”, it’s done via When executing a module ( The calls to the variadic Many node classes have moved to new modules in The choosing of the debug python has moved from Scons to Nuitka itself. That way it can respect the The replacing of Module recursion was changed into its own module, instead of being hidden in the optimization that considers import statements. As always, some PyLint work, and some minor Added more information to the Developer Manual, e.g. documenting the tree changes for The Debian package is as of this version verified to be installable and functional on to Ubuntu Natty, Maverick, Oneiric, and Precise. Added support to specify the binary under test with a Made sure the test runners work under Windows as well. Required making them more portable. And a workaround for For windows target the MinGW library is now linked statically. That means there is no requirement for MinGW to be in the The Added test to cover return values of rich comparisons in comparison chains, and order of argument evaluation for comparison chains. The Cover no arguments Added test to demonstrate that The created source package is now tested on pbuilder chroots to be pass installation and the basic tests, in addition to the full tests during package build time on these chroots. This will make sure, that Nuitka works fine on Ubuntu Natty and doesn’t break without notice. This releases contains many changes. The “temporary variable ref” and “assignment expression” work is ground breaking. I foresee that it will lead to even more simplifications of code generation in the future, when e.g. in-place assignments can be reduced to assignments to temporary variables and conditional statements. While there were many improvements related to Windows support and fixing portability bugs, or the Debian package, the real focus is the optimization work, which will ultimately end with “value propagation” working. These are the real focus. The old comparison chain handling was a big wart. Working, but no way understood by any form of analysis in Nuitka. Now they have a structure which makes their code generation based on semantics and allows for future optimization to see through them. Going down this route is an important preparatory step. And there will be more work like this needed. Consider e.g. handling of in-place assignments. With an “assignment expression” to a “temporary variable ref”, these become the same as user code using such a variable. There will be more of these to find. So, that is where the focus is. The release now was mostly aiming at getting involved fixes out. The bug fixed by comparison chain reworking, and the Bug Fixes
nuitka
and nuitka-python
had no special layout for the option groups and broken whitespace for --recurse-to
option. Also --g++-only
was only partially bold. Released as 0.3.18.1 hot fix already./
instead of using a joinpath
call. Released as 0.3.18.3 already.False
, for comparison chains, these would not be used, but False
instead, see .__import__
didn’t cover keyword arguments, these were simply ignored. Fixed, but no warning is given yet.New Features
--recurse-directory
and Nuitka will attempt to embed these modules even if not obviously imported. This is not yet working perfect yet, but will receive future improvements.exec
built-in of Python3, this enables us to run one more basic test, GlobalStatement.py
with Python3. The test ExecEval.py
nearly works now.Optimization
range()
call now optimized into the static CPython exception it raises.Cleanups
CPythonExpressionComparison
node, it now always has only 2 operands.and
with assignments to temporary variables, which are expressed by a new node type CPythonExpressionTempVariableRef
. This allowed to remove expression_temps
from C++ code templates and generation, reducing the overall complexity.--execute
but not --exe
), no longer does Nuitka import it into itself, instead a new interpreter is launched with a fresh environment.MAKE_TUPLE
were replaced with calls the MAKE_TUPLExx
(where xx
is the number of arguments), that are generated on a as-needed basis. This gives more readable code, because no EVAL_ORDERED_xx
is needed at call site anymore.nuitka.nodes
and grouped by theme. That makes them more accessible.sys.abiflags
and works with Python3..py
in filenames was made more robust. No longer is str.replace
used, but instead proper means to assure that having .py
as other parts of the filenames won’t be a trouble.TODO
were solved.Organizational
assert
to become a conditional statement with a raise statement, etc.NUITKA
environment, so the test framework can run with installed version of Nuitka too.os.execl
not propagating exit codes under Windows.PATH
or even installed to execute the binary.New Tests
basic
, programs
, syntax
, and reflected
were made executable under Windows. Occasionally this meant to make the test runners more portable, or to work around limitations.Referencing.py
test was made portable to Python3.range()
exception as well.--recurse-directory
actually works. This is using an __import__
that cannot be predicted at run time (yet).Summary
__import__
related one, were not suitable for hot fix releases, so that is why the 0.3.19 release had to occur now. But with plugin support, with this comparison chain cleanup, with improved Python3 support, and so on, there was plenty of good stuff already, also worth to get out.