Version 0.14.0
·
2082 commits
to master
since this release
"Dotting the t's and crossing the i's" edition:
Bugfixes:
setup.py: macros are not zip safe, becauseZipImporterfails to return source code for the module and MacroPy needs that.- fix splicing in the
do[]macro;ExpandedDoViewshould now work correctly - fix lambda handling in the
lazifymacro - fix
dict_itemshandling inmogrify(fixes the use of thecurrymacro with code usingfrozendict)
New:
roview: a read-only view into a sequence. Behaves mostly the same asview, but has no__setitem__orreverse.mg: a decorator to mathify a gfunc, so that it willm()the generator instances it makes.- The
do[]macro now supportsdelete[name]to delete a local variable previously created in the same do-expression usinglocal[name << value]. envifyblock macro, to make formal parameters live in an unpythonicenv.autorefblock macro, to implicitly reference attributes of an object (for reading only).
Breaking changes:
- The
macropy3bootstrapper now takes the-moption;macropy3 -m somemod, likepython3 -m somemod. The alternative is to specify a filename positionally;macropy3 somescript.py, likepython3 somescript.py. In either case, the bootstrapper will import the module in a special mode that pretends its__name__ == '__main__', to allow using the pythonic conditional main idiom also in macro-enabled code. - The constructor of the writable
viewnow checks that the input is not read-only (roview, or aSequencethat is not also aMutableSequence) before allowing creation of the writable view. envnow checks finalization status also when deleting attrs (a finalizedenvcannot add or delete bindings)
Non-breaking improvements: