#acl PaulHowarth:read,write,admin,revert,delete All:read === Thursday 31st December 2020 === ==== Fedora Project ==== * Updated `python-invoke` to 1.5.0 in Rawhide: * Allow any string-compatible object to be passed to '`Context.cd`', enabling use of (for example) '`pathlib.Path`' instances ([[https://github.com/pyinvoke/invoke/issues/454|GH#454]], [[https://github.com/pyinvoke/invoke/issues/577|GH#577]], [[https://github.com/pyinvoke/invoke/pull/583|GH#583]], [[https://github.com/pyinvoke/invoke/pull/607|GH#607]], [[https://github.com/pyinvoke/invoke/pull/681|GH#681]]) * Don't silently discard help text for task arguments whose names happen to contain underscores ([[https://github.com/pyinvoke/invoke/issues/409|GH#409]], [[https://github.com/pyinvoke/invoke/pull/580|GH#580]], [[https://github.com/pyinvoke/invoke/pull/611|GH#611]]) * Don't silently ignore task help specifiers that don't actually map to the decorated task's arguments (e.g. '`@task(help={"foo": "help for foo"})`' wrapping a task without a '`foo`' argument) ([[https://github.com/pyinvoke/invoke/issues/398|GH#398]], [[https://github.com/pyinvoke/invoke/pull/580|GH#580]], [[https://github.com/pyinvoke/invoke/pull/611|GH#611]]) * Allow subcollections to act as the default '`tasks`' of their parent collections (via the new '`default`' kwarg to '`~invoke.collection.Collection.add_collection`'); this means that non-trivial task trees can specify, e.g. "use my test subcollection's default task as the global default task" and similar ([[https://github.com/pyinvoke/invoke/pull/197|GH#197]]) * Enhanced test coverage in a handful of modules whose coverage was under 90% * '`~invoke.context.MockContext`' now populates its '`NotImplementedError`' exception instances (typically raised when a command is executed that had no pre-prepared result) with the command string that triggered them; this makes it much easier to tell what exactly in a test caused the error * '`~invoke.context.MockContext`' now accepts a few quality-of-life shortcuts as keys and values in its '`run`'/'`sudo`' arguments: * Keys may be compiled regular expression objects, as well as strings, and will match any calls whose commands match the regex * Values may be '`True`' or '`False`' as shorthand for otherwise empty '`~invoke.runners.Result`' objects with exit codes of '`0`' or '`1`' respectively * Values may also be strings, as shorthand for otherwise empty '`~invoke.runners.Result`' objects with those strings given as the '`stdout`' argument * Add a new '`repeat`' kwarg to '`~invoke.context.MockContext`' which, when `True` (default: `False`) causes stored results for its methods to be yielded repeatedly instead of consumed ([[https://github.com/pyinvoke/invoke/issues/441|GH#441]]) * Immutable iterable result values handed to '`~invoke.context.MockContext`' would yield errors (due to the use of '`pop()`'); the offending logic has been retooled to be more iterator-focused and now works for tuples and etc. * Update the testing documentation a bit: cleaned up existing examples and added new sections for the other updates in the 1.5 release * Automatically populate the '`command`' attribute of '`~invoke.runners.Result`' objects returned by '`~invoke.context.MockContext`' methods, with the command string triggering that result; previously, users had to do this by hand or otherwise suffered inaccurate result objects ([[https://github.com/pyinvoke/invoke/pull/700|GH#700]]) * Upgrade '`~invoke.context.MockContext`' to wrap its methods in '`Mock`' objects if the '`(unittest.)mock`' library is importable; this makes testing `Invoke`-using codebases even easier ----