Debian Codegraph @

sites/www/changelog.rst

raw
1 =========
2 Changelog
3 =========
4
5 - :release:`2.2.1 <2025-10-10>`
6 - :release:`2.1.4 <2025-10-10>`
7 - :bug:`1038` (fixed in :issue:`1040`) Python 3.14 tweaked the behavior of
8 `fcntl` to raise `SystemError` on buffer overflows, which our interpretation
9 of `termios.TIOCGWINSZ` technically was (we care only about the first two
10 fields in what is technically a four-field struct with half the fields
11 unused). This has been fixed by unpacking all 4 fields and then discarding
12 the unused fields during processing.
13
14 Thanks to ``@kasium`` for the original bug report and to ``@rathann`` and
15 ``@BradleyKirton`` for workshopping the patch into its final shape.
16 - :release:`2.2.0 <2023-07-12>`
17 - :feature:`-` Remove the somewhat inaccurate subclass requirement around
18 `~invoke.config.Config`'s ``.clone(into=...)`` constructor call. It was
19 broken for certain use cases (such as trying to clone one subclass into a
20 sibling subclass, which would yield a ``TypeError``) and is irrelevant if one
21 is using the new type annotations.
22 - :release:`2.1.3 <2023-06-14>`
23 - :bug:`944` After the release of 2.1, package-style task modules started
24 looking in the wrong place for project-level config files (inside one's eg
25 ``tasks/`` dir, instead of *next to* that dir) due to a subtlety in the new
26 import/discovery mechanism used. This has been fixed. Thanks to Arnaud V. and
27 Hunter Kelly for the reports and to Jesse P. Johnson for initial
28 debugging/diagnosis.
29 - :release:`2.1.2 <2023-05-15>`
30 - :support:`936 backported` Make sure ``py.typed`` is in our packaging
31 manifest; without it, users working from a regular installation
32 can't perform type checks. Thanks to Nikita Sobolev for catch & patch.
33 - :release:`2.1.1 <2023-05-01>`
34 - :bug:`934` The `importlib` upgrade in 2.1 had a corner case bug (regarding
35 ``from . import <submodule>`` functionality within package-like task trees)
36 which in turn exposed a false-pass in our test suite. Both have now been
37 fixed. Thanks to Greg Meyer and Robert J. Berger for the bug reports.
38 - :release:`2.0.1 <2023-04-29>`
39 - :bug:`910` Add more rigor around subprocess/runner shutdown to avoid spurious
40 exceptions & also fix downstream issues in libraries like Fabric. Reported by
41 Orlando Rodríguez.
42 - :release:`2.1.0 <2023-04-28>`
43 - :support:`675` Implement `importlib` and deprecate `imp` module. Patches
44 provided by Jesse P. Johnson
45 - :bug:`376 major` Resolve equality comparison bug for non-collections. Patch
46 via Jesse P. Johnson
47 - :support:`906` Implement type hints and type checking tests with mypy to
48 reduce errors and impove code documentation. Patches by Jesse P. Johnson and
49 review by Sam Bull.
50 - :support:`901 backported` (via :issue:`903`) Tweak test suite ``setup``
51 methods to be named ``setup_method`` so pytest stops whining about it. Patch
52 via Jesse P. Johnson.
53 - :release:`2.0.0 <2023-01-16>`
54 - :support:`-` Remove support for, and imports related to, all Python versions
55 less than 3.6 - including Python 2. This also includes updates to vendored
56 packages, such as removing ``six`` and upgrading ``lexicon`` to the latest
57 version; and also treatment of things like ``Mock`` use within
58 `invoke.context.MockContext` (which now expects stdlib's ``unittest.mock``
59 instead of hunting for the old standalone ``mock`` library).
60
61 Thanks to various folks for patches related to some of this work, including
62 Jesse P. Johnson who supplied multiple PRs whose commits made it in.
63
64 .. warning::
65 This change is backwards incompatible in the following scenarios:
66
67 - You use Python <3.6. Shouldn't be an issue as we now specify
68 ``python_requires`` in packaging metadata.
69 - You call ``invoke.util.encode_output`` manually for some reason. (This
70 became a noop under Python 3, so just...remove it!)
71 - You use `invoke.context.MockContext`; its ``repeat`` init kwarg changed
72 its default value from ``False`` to ``True``. This probably won't bite
73 you, but we mention it just in case you somehow relied upon the legacy
74 behavior.
75 - You subclass `invoke.runners.Runner` and/or have had to interact with its
76 ``stop`` or ``stop_timer`` methods. The latter has been merged into the
77 former, and if you are overriding ``stop``, you'll want to make sure you
78 now call ``super()`` somewhere if you were not already.
79
80 - :support:`-` `Task.argspec <invoke.tasks.Task.argspec>` has changed its
81 return value; it now returns an `inspect.Signature` derived from that of the
82 task's body callable.
83
84 .. warning::
85 This change is backwards incompatible if you were using this method
86 directly.
87
88 - :release:`1.7.3 <2022-09-30>`
89 - :support:`- backported` Fix a non-fatal bug in our setup.py
90 ``long_description`` generation causing 1.7.0-1.7.2 to have malformed
91 description text on PyPI.
92 - :release:`1.7.2 <2022-09-30>`
93 - :bug:`876` Refactor CLI parser instantiation such that the
94 ``tasks.ignore_unknown_help`` feature (added in 1.7) works when Invoke is run
95 in ``--complete`` mode, i.e. in tab-completion scripts.
96 - :bug:`-` Fix errors thrown when comparing `~invoke.tasks.Task` objects to
97 non-Task objects; such comparisons are now always false.
98 - :release:`1.7.1 <2022-05-11>`
99 - :bug:`659` Improve behavior under ``nohup``, which causes stdin to become an
100 undetectably-unreadable (but otherwise legit) file descriptor. Previously
101 this led to `OSError` even if you weren't expecting anything on stdin; we now
102 trap this specific case and silently ignore it, allowing execution to
103 continue. Thanks to ``@kingkisskill`` for initial report and to Ryan Stoner
104 for followup and workshopping.
105 - :release:`1.7.0 <2022-03-18>`
106 - :feature:`793` Add a new ``tasks.ignore_unknown_help`` config option for
107 users who hand their tasks centrally-defined argument help dictionaries; it
108 defaults to ``False`` but such users may set it to ``True`` to avoid
109 exceptions. Thanks to ``@Allu2`` for the report.
110 - :support:`-` Switch to using ``yaml.safe_load`` for loading config files.
111 This avoids some warnings under newer PyYAML versions and is also, in a
112 shocking twist, more secure.
113 - :support:`803` Upgrade our vendored PyYAML from 3.11 to 5.4.1; this should
114 both supply a number of security fixes, and address problems loading
115 project-level YAML config files under Python 3.10. Fix via Andreas Rammhold.
116 - :feature:`845` Env vars explicitly supplied to `~invoke.context.Context.sudo`
117 (via its ``env`` kwarg) are now explicitly preserved via ``sudo``'s
118 ``--preserve-env`` argument. Patch courtesy of Benno Rice.
119 - :support:`-` Switch our continuous integration service from Travis-CI to
120 Circle-CI, plus related and necessary updates to various administrative
121 config files, management tasks and metadata. Including but not limited to:
122
123 - Enhanced PyPI-level metadata/links
124 - Split out tool config data from ``setup.cfg``
125 - Enhance execution & coverage of unit vs integration tests under CI
126
127 .. warning::
128 Due to various factors, this release will **not** include a Python
129 2-compatible wheel archive. Users of Python 2 can still install from the
130 sdist, and are strongly encouraged to check `the roadmap
131 <https://bitprophet.org/projects/#roadmap>`_ as the next release will
132 likely be the one that removes Python 2 entirely!
133
134 - :release:`1.6.0 <2021-07-09>`
135 - :release:`1.5.1 <2021-07-09>`
136 - :support:`- backported` (Mostly) alphabetize the list of ``run()`` params in
137 the runners API docs. Previously they were an unordered mess.
138 - :support:`- backported` Document the ``dry`` keyword argument to ``run``,
139 which had been added in version 1.3 but only documented as a CLI flag; it
140 does also work as a kwarg (and as a config option).
141 - :bug:`751` Don't explode on empty-but-for-whitespace task docstrings. Thanks
142 to Matt Hayden for the report & initial patches.
143 - :feature:`791` Add a new ``run.echo_format`` configuration option allowing
144 control over the format of echoed commands. It defaults to the previously
145 hardcoded value (wrap in ANSI bold) and is thus backwards compatible. Thanks
146 to David JM Emmett for the patch.
147 - :release:`1.5.0 <2020-12-30>`
148 - :feature:`454` (also :issue:`577`/:issue:`658`, via
149 :issue:`583`/:issue:`681`/:issue:`607`) Allow any string-compatible object to
150 be passed to `Context.cd <invoke.context.Context.cd>`, enabling use of eg
151 ``pathlib.Path`` instances. Thanks to Jimm Domingo for the original report
152 and Ludovico Bianchi, Mario César, and Floris Lambrechts for patches.
153 - :bug:`409 major` (via :issue:`611`/:issue:`580`) Don't silently discard help
154 text for task arguments whose names happen to contain underscores. Reported
155 by ``@iago1460``, original patches by Hayden Flinner and Floris Lambrechts.
156 - :bug:`398 major` (via :issue:`611`/:issue:`580`) Don't silently ignore task
157 help specifiers which don't actually map to the decorated task's arguments
158 (eg ``@task(help={"foo": "help for foo"})`` wrapping a task without a ``foo``
159 argument). Reported by Sohaib Farooqi, with original patches by Hayden
160 Flinner and Floris Lambrechts.
161 - :feature:`197` Allow subcollections to act as the default 'tasks' of their
162 parent collections (via the new ``default`` kwarg to
163 `~invoke.collection.Collection.add_collection`). This means that nontrivial
164 task trees can specify eg "use my test subcollection's default task as the
165 global default task" and similar. Thanks to Tye Wang for the request and
166 initial patch.
167 - :support:`-` Enhanced test coverage in a handful of modules whose coverage
168 was under 90%.
169 - :feature:`-` `~invoke.context.MockContext` now populates its
170 ``NotImplementedError`` exception instances (typically raised when a command
171 is executed which had no pre-prepared result) with the command string that
172 triggered them; this makes it much easier to tell what exactly in a test
173 caused the error.
174 - :feature:`-` `~invoke.context.MockContext` now accepts a few quality-of-life
175 shortcuts as keys and values in its ``run``/``sudo`` arguments:
176
177 - Keys may be compiled regular expression objects, as well as strings, and
178 will match any calls whose commands match the regex.
179 - Values may be ``True`` or ``False`` as shorthand for otherwise empty
180 `~invoke.runners.Result` objects with exit codes of ``0`` or ``1``
181 respectively.
182 - Values may also be strings, as shorthand for otherwise empty
183 `~invoke.runners.Result` objects with those strings given as the
184 ``stdout`` argument.
185
186 - :feature:`441` Add a new ``repeat`` kwarg to `~invoke.context.MockContext`
187 which, when True (default: False) causes stored results for its methods to be
188 yielded repeatedly instead of consumed. Feature request courtesy of
189 ``@SwampFalc``.
190 - :bug:`- major` Immutable iterable result values handed to
191 `~invoke.context.MockContext` would yield errors (due to the use of
192 ``pop()``). The offending logic has been retooled to be more iterator-focused
193 and now works for tuples and etc.
194 - :support:`-` Update the :ref:`testing documentation <testing-user-code>` a
195 bit: cleaned up existing examples and added new sections for the other
196 updates in the 1.5 release.
197 - :feature:`700` Automatically populate the ``command`` attribute of
198 `~invoke.runners.Result` objects returned by `~invoke.context.MockContext`
199 methods, with the command string triggering that result. Previously users had
200 to do this by hand or otherwise suffered inaccurate result objects. Thanks to
201 ``@SwampFalc`` for the report & initial patch.
202 - :feature:`-` Upgrade `~invoke.context.MockContext` to wrap its methods in
203 ``Mock`` objects if the ``(unittest.)mock`` library is importable. This makes
204 testing Invoke-using codebases even easier.
205 - :release:`1.4.1 <2020-01-29>`
206 - :release:`1.3.1 <2020-01-29>`
207 - :support:`586 backported` Explicitly strip out ``__pycache__`` (and for good
208 measure, ``.py[co]``, which previously we only stripped from the ``tests/``
209 folder) in our ``MANIFEST.in``, since at least some earlier releases
210 erroneously included such. Credit to Martijn Pieters for the report and
211 Floris Lambrechts for the patch.
212 - :bug:`660` Fix an issue with `~invoke.run` & friends having intermittent
213 problems at exit time (symptom was typically about the exit code value being
214 ``None`` instead of an integer; often with an exception trace). Thanks to
215 Frank Lazzarini for the report and to the numerous others who provided
216 reproduction cases.
217 - :bug:`518` Close pseudoterminals opened by the `~invoke.runners.Local` class
218 during ``run(..., pty=True)``. Previously, these were only closed
219 incidentally at process shutdown, causing file descriptor leakage in
220 long-running processes. Thanks to Jonathan Paulson for the report.
221 - :release:`1.4.0 <2020-01-03>`
222 - :bug:`637 major` A corner case in `~invoke.context.Context.run` caused
223 overridden streams to be unused if those streams were also set to be hidden
224 (eg ``run(command, hide=True, out_stream=StringIO())`` would result in no
225 writes to the ``StringIO`` object).
226
227 This has been fixed - hiding for a given stream is now ignored if that stream
228 has been set to some non-``None`` (and in the case of ``in_stream``,
229 non-``False``) value.
230 - :bug:`- major` As part of feature work on :issue:`682`, we noticed that the
231 `~invoke.runners.Result` return value from `~invoke.context.Context.run` was
232 inconsistent between dry-run and regular modes; for example, the dry-run
233 version of the object lacked updated values for ``hide``, ``encoding`` and
234 ``env``. This has been fixed.
235 - :feature:`682` (originally reported as :issue:`194`) Add asynchronous
236 behavior to `~invoke.runners.Runner.run`:
237
238 - Basic asynchronicity, where the method returns as soon as the subprocess
239 has started running, and that return value is an object with methods
240 allowing access to the final result.
241 - "Disowning" subprocesses entirely, which not only returns immediately but
242 also omits background threading, allowing the subprocesses to outlive
243 Invoke's own process.
244
245 See the updated API docs for the `~invoke.runners.Runner` for details on the
246 new ``asynchronous`` and ``disown`` kwargs enabling this behavior. Thanks to
247 ``@MinchinWeb`` for the original report.
248 - :feature:`-` Never accompanied the top-level singleton `~invoke.run` (which
249 simply wraps an anonymous `~invoke.context.Context`'s ``run`` method) with
250 its logical sibling, `~invoke.sudo` - this has been remedied.
251 - :release:`1.3.0 <2019-08-06>`
252 - :feature:`324` Add basic dry-run support, in the form of a new
253 :option:`--dry` CLI option and matching ``run.dry`` config setting, which
254 causes command runners (eg `~invoke.run`, `Context.run
255 <invoke.context.Context.run>`) to:
256
257 - Act as if the ``echo`` option has been turned on, printing the
258 command-to-be-run to stdout;
259 - Skip actual subprocess invocation (returning before any of that machinery
260 starts running);
261 - Return a dummy `~invoke.runners.Result` object with 'blank' values (empty
262 stdout/err strings, ``0`` exit code, etc).
263
264 This allows quickly seeing what a given task or series of tasks might do,
265 without actually running any shell commands (though naturally, any
266 state-modifying Python code will still run).
267
268 Thanks to Monty Hindman for the feature request and ``@thebjorn`` for the
269 initial patch.
270
271 - :bug:`384 major` (via :issue:`653`) Modify config file loading so it detects
272 missing-file IOErrors via their ``errno`` attribute instead of their string
273 rendering (eg ``"No such file"``). This should improve compatibility for
274 non-English locales. Thanks to Patrick Massot for the report and Github user
275 ``@cybiere`` for the patch.
276 - :feature:`539` (via :issue:`645`) Add support for command timeouts, i.e. the
277 ability to add an upper bound on how long a call to
278 `~invoke.context.Context.run` may take to execute. Specifically:
279
280 - A ``timeout`` argument to `~invoke.context.Context.run`.
281 - The ``timeouts.command`` config setting mapping to that argument.
282 - The :option:`-T/--command-timeout <-T>` CLI flag.
283
284 Thanks to Israel Fruchter for the request & an early version of the patchset.
285 - :bug:`552 major` (also :issue:`553`) Add a new `~invoke.runners.Runner`
286 method, `~invoke.runners.Runner.close_proc_stdin`, and call it when standard
287 input processing detects an EOF. Without this, subprocesses that read their
288 stdin until EOF would block forever, hanging the program. Thanks to
289 ``@plockc`` for the report & initial patch.
290
291 .. note::
292 This fix only applies when ``pty=False`` (the default); PTYs complicate the
293 situation greatly (but also mean the issue is less likely to occur).
294
295 - :bug:`557 major` (with assist from :issue:`640`) Fix the
296 `~invoke.context.Context.cd` and `~invoke.context.Context.prefix` context
297 managers so that ``with cd`` and ``with prefix`` correctly revert their state
298 manipulations after they exit, when exceptions occur. Thanks to Jon Walsh and
299 Artur Puzio for their respective patches.
300 - :bug:`466 major` Update the parsing and CLI-program mechanisms so that all
301 core arguments may be given within task CLI contexts; previously this
302 functionality only worked for the ``--help`` flag, and other core arguments
303 given after task names (such as ``--echo``) were silently ignored.
304 - :feature:`-` Allow the configuration system to override which
305 `~invoke.executor.Executor` subclass to use when executing tasks (via an
306 import-oriented string).
307
308 Specifically, it's now possible to alter execution by distributing such a
309 subclass alongside, for example, a repository-local config file which sets
310 ``tasks.executor_class``; previously, this sort of thing required use of
311 :ref:`custom binaries <reusing-as-a-binary>`.
312 - :release:`1.2.0 <2018-09-13>`
313 - :feature:`301` (via :issue:`414`) Overhaul tab completion mechanisms so users
314 can :ref:`print a completion script <print-completion-script>` which
315 automatically matches the emitting binary's configured names (compared to the
316 previous hardcoded scripts, which only worked for ``inv``/``invoke`` by
317 default). Thanks to Nicolas Höning for the foundational patchset.
318 - :release:`1.1.1 <2018-07-31>`
319 - :release:`1.0.2 <2018-07-31>`
320 - :bug:`556` (also `fabric/fabric#1823
321 <https://github.com/fabric/fabric/issues/1823>`_) Pre-emptively check for an
322 error condition involving an unpicklable config file value (Python config
323 files and imported module objects) and raise a useful exception instead of
324 allowing a confusing ``TypeError`` to bubble up later. Reported by Pham Cong
325 Dinh.
326 - :bug:`559` (also `fabric/fabric#1812
327 <https://github.com/fabric/fabric/issues/1812>`_) Modify how
328 `~invoke.runners.Runner` performs stdin terminal mode changes, to avoid
329 incorrect terminal state restoration when run concurrently (which could lead
330 to things like terminal echo becoming disabled after the Python process
331 exits).
332
333 Thanks to Adam Jensen and Nick Timkovich for the detailed bug reports &
334 reproduction assistance.
335 - :release:`1.1.0 <2018-07-12>`
336 - :release:`1.0.1 <2018-07-12>`
337 - :feature:`-` Enhance `~invoke.tasks.Call` with a new method
338 (``clone_data``) and new kwarg to an existing method (``clone`` grew
339 ``with_``) to assist subclassers when extending.
340 - :bug:`270` (also :issue:`551`) ``None`` values in config levels (most
341 commonly caused by empty configuration files) would raise ``AttributeError``
342 when `~invoke.config.merge_dicts` was used to merge config levels together.
343 This has been fixed. Thanks to Tyler Hoffman and Vlad Frolov for the reports.
344 - :feature:`-` Refactor `~invoke.tasks.Call` internals slightly, exposing some
345 previously internal logic as the ``clone_data`` method; this is useful for
346 client codebases when extending `~invoke.tasks.Call` and friends.
347 - :feature:`-` Remove overzealous argument checking in `@task
348 <invoke.tasks.task>`, instead just handing any extra kwargs into the task
349 class constructor. The high level behavior for truly invalid kwargs is the
350 same (``TypeError``) but now extending codebases can add kwargs to their
351 versions of ``@task`` without issue.
352 - :feature:`-` Add a ``klass`` kwarg to `@task <invoke.tasks.task>` to allow
353 extending codebases the ability to create their own variants on
354 ``@task``/``Task``.
355 - :bug:`-` Fix up the ``__repr__`` of `~invoke.tasks.Call` to reference dynamic
356 class name instead of hardcoding ``"Call"``; this allows subclasses'
357 ``__repr__`` output to be correct instead of confusing.
358 - :support:`- backported` Fixed some inaccuracies in the API docs around
359 `~invoke.executor.Executor` and its ``core`` kwarg (was erroneously referring
360 to `~invoke.parser.context.ParserContext` instead of
361 `~invoke.parser.parser.ParseResult`). Includes related cleaning-up of
362 docstrings and tests.
363 - :support:`- backported` Apply the `black <https://black.readthedocs.io/>`_
364 code formatter to our codebase and our CI configuration.
365 - :support:`- backported` Fix some test-suite-only failures preventing
366 successful testing on Python 3.7 and PyPy3, and move them out of the 'allowed
367 failures' test matrix quarantine now that they pass.
368 - :support:`- backported` Implemented some minor missing tests, such as testing
369 the ``INVOKE_DEBUG`` low-level env var.
370 - :feature:`543` Implemented support for using ``INVOKE_RUNTIME_CONFIG`` env
371 var as an alternate method of supplying a runtime configuration file path
372 (effectively, an env var based version of using the ``-f``/``--config``
373 option). Feature request via Kevin J. Qiu.
374 - :bug:`528` Around Invoke 0.23 we broke the ability to weave in subcollections
375 via keyword arguments to `~invoke.collection.Collection`, though it primarily
376 manifests as ``NoneType`` related errors during ``inv --list``. This was
377 unintentional and has been fixed. Report submitted by Tuukka Mustonen.
378 - :bug:`-` As part of solving :issue:`528` we found a related bug, where
379 unnamed subcollections also caused issues with ``inv --list
380 --list-format=json``. Specifically, `Collection.serialized
381 <invoke.collection.Collection.serialized>` sorts subcollections by name,
382 which is problematic when that name is ``None``. This is now fixed.
383 - :release:`1.0.0 <2018-05-09>`
384 - :feature:`-` Added the :ref:`--prompt-for-sudo-password
385 <prompt-for-sudo-password>` CLI option for getpass-based up-front prompting
386 of a sensitive configuration value.
387 - :feature:`-` Updated `~invoke.tasks.Task` to mimic the wrapped function's
388 ``__module__`` attribute, allowing for better interaction with things like
389 Sphinx autodoc that attempt to filter out imported objects from a module.
390 - :bug:`- major` Removed an old, unused and untested (but, regrettably,
391 documented and public) method that doesn't seem to be much use:
392 ``invoke.config.Config.paths``. Please reach out if you were actually using
393 it and we may consider adding some form of it back.
394
395 .. warning::
396 This is a backwards incompatible change if you were using ``Config.paths``.
397
398 - :bug:`- major` Tweaked the innards of
399 `~invoke.config.Config`/`~invoke.config.DataProxy` to prevent accessing
400 properties & other attributes' values during ``__setattr__`` (the code in
401 question only needed the names). This should have no noticeable effect on
402 user code (besides a marginal speed increase) but fixed some minor test
403 coverage issues.
404 - :release:`0.23.0 <2018-04-29>`
405 - :bug:`- major` Previously, some error conditions (such as invalid task or
406 collection names being supplied by the user) printed to standard output,
407 instead of standard error. Standard error seems more appropriate here, so
408 this has been fixed.
409
410 .. warning::
411 This is backwards incompatible if you were explicitly checking the standard
412 output of the ``inv[oke]`` program for some of these error messages.
413
414 .. warning::
415 If your code is manually raising or introspecting instances of
416 `~invoke.exceptions.Exit`, note that its signature has changed from
417 ``Exit(code=0)`` to ``Exit(message=None, code=None)``. (Thus, this will
418 only impact you if you were calling its constructor instead of raising the
419 class object itself.)
420
421 - :bug:`- major` `~invoke.collection.Collection` had some minor bugs or
422 oversights in how it responds to things like ``repr()``, ``==``; boolean
423 behavior; how docstrings appear when created from a Python module; etc. All
424 are now fixed. If you're not sure whether this affects you, it does not :)
425 - :bug:`- major` Integer-type CLI arguments were not displaying placeholder
426 text in ``--help`` output (i.e. they appeared as ``--myint`` instead of
427 ``--myint=INT``.) This has been fixed.
428 - :feature:`33` Overhaul task listing (formerly just a simple, boolean
429 ``--list``) to make life easier for users with nontrivial task trees:
430
431 - Limit display to a specific namespace by giving an optional argument to
432 ``--list``, e.g. ``--list build``;
433 - Additional output formats besides the default (now known as ``flat``) such
434 as a nested view with ``--list-format nested`` or script-friendly output
435 with ``--list-format json``.
436 - The default ``flat`` format now sorts a bit differently - the previous
437 algorithm would break up trees of tasks.
438 - Limit listing depth, so it's easier to view only the first level or two
439 (i.e. the overall namespaces) of a large tree, e.g. ``--list --list-depth
440 1``;
441
442 Thanks to the many users who submitted various requests under this ticket's
443 umbrella, and to Dave Burkholder in particular for detailed use case analysis
444 & feedback.
445
446 - :support:`-` (partially re: :issue:`33`) Renamed the ``--root`` CLI flag to
447 ``--search-root``, partly for clarity (:issue:`33` will be adding namespace
448 display-root related flags, which would make ``--root`` ambiguous) and partly
449 for consistency with the config option, which was already named
450 ``search_root``. (The short version of the flag, ``-r``, is unchanged.)
451
452 .. warning::
453 This is a backwards incompatible change. To fix, simply use
454 ``--search-root`` anywhere you were previously using ``--root``.
455 - :bug:`516 major` Remove the CLI parser ambiguity rule regarding flag-like
456 tokens which are seen after an optional-value flag (e.g. ``inv task
457 --optionally-takes-a-value --some-other-flag``.) Previously, any flag-like
458 value in such a spot was considered ambiguous and raised a
459 `~invoke.exceptions.ParseError`. Now, the surrounding parse context is used
460 to resolve the ambiguity, and no error is raised.
461
462 .. warning::
463 This behavior is backwards incompatible, but only if you had the minority
464 case where users frequently *and erroneously* give otherwise-legitimate
465 flag-like values to optional-value arguments, and you rely on the parse
466 errors to notify them of their mistake. (If you don't understand what this
467 means, don't worry, you almost certainly don't need to care!)
468
469 - :support:`515` Ported the test suite from `spec
470 <https://github.com/bitprophet/spec>`_ (`nose
471 <https://nose.readthedocs.io>`_) to `pytest-relaxed
472 <https://github.com/bitprophet/pytest-relaxed>`_ (`pytest
473 <https://pytest.org>`_) as pytest basically won the test-runner war against
474 nose & has greater mindshare, more shiny toys, etc.
475 - :support:`-` Rename ``invoke.platform`` to ``invoke.terminals``; it was
476 inadvertently shadowing the ``platform`` standard library builtin module.
477 This was not causing any bugs we are aware of, but it is still poor hygiene.
478
479 .. warning::
480 This change is technically backwards incompatible. We don't expect many
481 users import ``invoke.platform`` directly, but if you are, take note.
482
483 - :bug:`- major` (partially re: :issue:`449`) Update error message around
484 missing positional arguments so it actually lists them. Includes a minor
485 tweak to the API of `~invoke.parser.context.ParserContext`, namely changing
486 ``needs_positional_arguments`` (bool) to ``missing_positional_arguments``
487 (list).
488 - :release:`0.22.1 <2018-01-29>`
489 - :bug:`342` Accidentally hardcoded ``Collection`` instead of ``cls`` in
490 `Collection.from_module <invoke.collection.Collection.from_module>` (an
491 alternate constructor and therefore a classmethod.) This made it rather hard
492 to properly subclass `~invoke.collection.Collection`. Report and initial
493 patch courtesy of Luc Saffre.
494 - :support:`433 backported` Add -dev and -nightly style Python versions to our
495 Travis builds. Thanks to ``@SylvainDe`` for the contribution.
496 - :bug:`437` When merging configuration levels together (which uses
497 `copy.copy` by default), pass file objects by reference so they don't get
498 closed. Catch & patch by Paul Healy.
499 - :support:`469 backported` Fix up the :ref:`doc/example
500 <customizing-config-defaults>` re: subclassing `~invoke.config.Config`.
501 Credit: ``@Aiky30``.
502 - :bug:`488` Account for additional I/O related ``OSError`` error strings
503 when attempting to capture only this specific subtype of error. This should
504 fix some issues with less common libc implementations such as ``musl`` (as
505 found on e.g. Alpine Linux.) Thanks to Rajitha Perera for the report.
506 - :release:`0.22.0 <2017-11-29>`
507 - :bug:`407 major` (also :issue:`494`, :issue:`67`) Update the default value of
508 the ``run.shell`` config value so that it reflects a Windows-appropriate
509 value (specifically, the ``COMSPEC`` env var or a fallback of ``cmd.exe``) on
510 Windows platforms. This prevents Windows users from being forced to always
511 ship around configuration-level overrides.
512
513 Thanks to Maciej 'maQ' Kusz for the original patchset, and to ``@thebjorn``
514 and Garrett Jenkins for providing lots of feedback.
515 - :bug:`- major` Iterable-type CLI args were actually still somewhat broken &
516 were 'eating' values after themselves in the parser stream (thus e.g.
517 preventing parsing of subsequent tasks or flags.) This has been fixed.
518 - :support:`364` Drop Python 2.6 and Python 3.3 support, as these versions now
519 account for only very low percentages of the userbase and are unsupported (or
520 about to be unsupported) by the rest of the ecosystem, including ``pip``.
521
522 This includes updating documentation & packaging metadata as well as taking
523 advantage of basic syntax additions like set literals/comprehensions (``{1,
524 2, 3}`` instead of ``set([1, 2, 3])``) and removing positional string
525 argument specifiers (``"{}".format(val)`` instead of ``"{0}".format(val)``).
526
527 - :release:`0.21.0 <2017-09-18>`
528 - :feature:`132` Implement 'iterable' and 'incrementable' CLI flags, allowing
529 for invocations like ``inv mytask --listy foo --listy bar`` (resulting in a
530 call like ``mytask(listy=['foo', 'bar'])``) or ``inv mytask -vvv`` (resulting
531 in e.g. ``mytask(verbose=3)``. Specifically, these require use of the new
532 :ref:`iterable <iterable-flag-values>` and :ref:`incrementable
533 <incrementable-flag-values>` arguments to `@task <invoke.tasks.task>` - see
534 those links to the conceptual docs for details.
535 - :release:`0.20.4 <2017-08-14>`
536 - :bug:`-` The behavior of `Config <invoke.config.Config>` when ``lazy=True``
537 didn't match that described in the API docs, after the recent updates to its
538 lifecycle. (Specifically, any config data given to the constructor was not
539 visible in the resulting instance until ``merge()`` was explicitly called.)
540 This has been fixed, along with other related minor issues.
541 - :release:`0.20.3 <2017-08-04>`
542 - :bug:`467` (Arguably also a feature, but since it enables behavior users
543 clearly found intuitive, we're considering it a bug.) Split up the parsing
544 machinery of `Program <invoke.program.Program>` and pushed the `Collection
545 <invoke.collection.Collection>`-making out of `Loader
546 <invoke.loader.Loader>`. Combined, this allows us to honor the project-level
547 config file *before* the second (task-oriented) CLI parsing step, instead of
548 after.
549
550 For example, this means you can turn off ``auto_dash_names`` in your
551 per-project configs and not only in your system or user configs.
552
553 Report again courtesy of Luke Orland.
554
555 .. warning::
556 This is a backwards incompatible change *if* you were subclassing and
557 overriding any of the affected methods in the ``Program`` or ``Loader``
558 classes.
559
560 - :release:`0.20.2 <2017-08-02>`
561 - :bug:`465` The ``tasks.auto_dash_names`` config option added in ``0.20.0``
562 wasn't being fully honored when set to ``False``; this has been fixed. Thanks
563 to Luke Orland for the report.
564 - :release:`0.20.1 <2017-07-27>`
565 - :bug:`-` Fix a broken ``six.moves`` import within ``invoke.util``; was
566 causing ``ImportError`` in environments without an external copy of ``six``
567 installed.
568
569 The dangers of one's local and CI environments all pulling down packages that
570 use ``six``! It's everywhere!
571 - :release:`0.20.0 <2017-07-27>`
572 - :feature:`-` (required to support :issue:`310` and :issue:`329`) Break up the
573 `~invoke.config.Config` lifecycle some more, allowing it to gradually load
574 configuration vectors; this allows the CLI machinery
575 (`~invoke.executor.Executor`) to honor configuration settings from config
576 files which impact how CLI parsing and task loading behaves.
577
578 Specifically, this adds more public ``Config.load_*`` methods, which in
579 tandem with the ``lazy`` kwarg to ``__init__`` (formerly ``defer_post_init``,
580 see below) allow full control over exactly when each config level is loaded.
581
582 .. warning::
583 This change may be backwards incompatible if you were using or subclassing
584 the `~invoke.config.Config` class in any of the following ways:
585
586 - If you were passing ``__init__`` kwargs such as ``project_home`` or
587 ``runtime_path`` and expecting those files to auto-load, they no longer
588 do; you must explicitly call `~invoke.config.Config.load_project` and/or
589 `~invoke.config.Config.load_runtime` explicitly.
590 - The ``defer_post_init`` keyword argument to ``Config.__init__`` has been
591 renamed to ``lazy``, and controls whether system/user config files are
592 auto-loaded.
593 - ``Config.post_init`` has been removed, in favor of explicit/granular use
594 of the ``load_*`` family of methods.
595 - All ``load_*`` methods now call ``Config.merge`` automatically by default
596 (previously, merging was deferred to the end of most config related
597 workflows.)
598
599 This should only be a problem if your config contents are extremely large
600 (it's an entirely in-memory dict-traversal operation) and can be avoided
601 by specifying ``merge=False`` to any such method. (Note that you must, at
602 some point, call `~invoke.config.Config.merge` in order for the config
603 object to work normally!)
604
605 - :feature:`310` (also :issue:`455`, :issue:`291`) Allow configuring collection
606 root directory & module name via configuration files (previously, they were
607 only configurable via CLI flags or generating a custom
608 `~invoke.program.Program`.)
609 - :feature:`329` All task and collection names now have underscores turned into
610 dashes automatically, as task parameters have been for some time. This
611 impacts ``--list``, ``--help``, and of course the parser. For details, see
612 :ref:`dashes-vs-underscores`.
613
614 This behavior is controlled by a new config setting,
615 ``tasks.auto_dash_names``, which can be set to ``False`` to go back to the
616 classic behavior.
617
618 Thanks to Alexander Artemenko for the initial feature request.
619 - :bug:`396 major` ``Collection.add_task(task, aliases=('other', 'names')`` was
620 listed in the conceptual documentation, but not implemented (technically, it
621 was removed at some point and never reinstated.) It has been (re-)added and
622 now exists. Thanks to ``@jenisys`` for the report.
623
624 .. warning::
625 This technically changes argument order for `Collection.add_task
626 <invoke.collection.Collection.add_task>`, so be aware if you were using
627 positional arguments!
628
629 - :bug:`- major` Display of hidden subprocess output when a command
630 execution failed (end-of-session output starting with ``Encountered a bad
631 command exit code!``) was liable to display encoding errors (e.g. ``'ascii'
632 codec can't encode character ...``) when that output was not
633 ASCII-compatible.
634
635 This problem was previously solved for *non-hidden* (mirrored) subprocess
636 output, but the fix (encode the data with the local encoding) had not been
637 applied to exception display. Now it's applied in both cases.
638 - :feature:`322` Allow users to completely disable mirroring of stdin to
639 subprocesses, by specifying ``False`` for the ``run.in_stream`` config
640 setting and/or keyword argument.
641
642 This can help prevent problems when running Invoke under systems that have no
643 useful standard input and which otherwise defeat our pty/fileno related
644 detection.
645 - :release:`0.19.0 <2017-06-19>`
646 - :feature:`-` Add `MockContext.set_result_for
647 <invoke.context.MockContext.set_result_for>` to allow massaging a mock
648 Context's configured results after instantiation.
649 - :release:`0.18.1 <2017-06-07>`
650 - :bug:`-` Update Context internals re: command execution & configuration of
651 runner subclasses, to work better in client libraries such as Fabric 2.
652
653 .. note::
654 If you were using the undocumented ``runner`` configuration value added
655 in :issue:`446`, it is now ``runners.local``.
656
657 .. warning::
658 This change modifies the internals of methods like
659 `~invoke.context.Context.run` and `~invoke.context.Context.sudo`; users
660 maintaining their own subclasses should be aware of possible breakage.
661
662 - :release:`0.18.0 <2017-06-02>`
663 - :feature:`446` Implement `~invoke.context.Context.cd` and
664 `~invoke.context.Context.prefix` context managers (as methods on the
665 not-that-one-the-other-one `~invoke.context.Context` class.) These are based
666 on similar functionality in Fabric 1.x. Credit: Ryan P Kilby.
667 - :support:`448` Fix up some config-related tests that have been failing on
668 Windows for some time. Thanks to Ryan P Kilby.
669 - :feature:`205` Allow giving core flags like ``--help`` after tasks to trigger
670 per-task help. Previously, only ``inv --help taskname`` worked.
671
672 .. note::
673 Tasks with their own ``--help`` flags won't be able to leverage this
674 feature - the parser will still interpret the flag as being per-task and
675 not global. This may change in the future to simply throw an exception
676 complaining about the ambiguity. (Feedback welcome.)
677
678 - :feature:`444` Add support for being used as ``python -m invoke <args>`` on
679 Python 2.7 and up. Thanks to Pekka Klärck for the feature request.
680 - :release:`0.17.0 <2017-05-05>`
681 - :bug:`439 major` Avoid placing stdin into bytewise read mode when it looks
682 like Invoke has been placed in the background by a shell's job control
683 system; doing so was causing the shell to pause the Invoke process (e.g. with
684 a message like ``suspended (tty output)``.) Reported by Tuukka Mustonen.
685 - :bug:`425 major` Fix ``Inappropriate ioctl for device`` errors (usually
686 ``OSError``) when running Invoke without a tty-attached stdin (i.e. when run
687 under 'headless' continuous integration systems or simply as e.g. ``inv
688 sometask < /dev/null`` (redirected stdin.) Thanks to Javier Domingo Cansino
689 for the report & Tuukka Mustonen for troubleshooting assistance.
690 - :feature:`-` Add a ``user`` kwarg & config parameter to
691 `Context.sudo <invoke.context.Context.sudo>`, which corresponds roughly to
692 ``sudo -u <user> <command>``.
693 - :bug:`440 major` Make sure to skip a call to ``struct``/``ioctl`` on Windows
694 platforms; otherwise certain situations inside ``run`` calls would trigger
695 import errors. Thanks to ``@chrisc11`` for the report.
696 - :release:`0.16.3 <2017-04-18>`
697 - :bug:`-` Even more setup.py related tomfoolery.
698 - :release:`0.16.2 <2017-04-18>`
699 - :bug:`-` Deal with the fact that PyPI's rendering of Restructured Text has no
700 idea about our fancy new use of Sphinx's doctest module. Sob.
701 - :release:`0.16.1 <2017-04-18>`
702 - :bug:`-` Fix a silly typo preventing proper rendering of the packaging
703 ``long_description`` (causing an effectively blank PyPI description.)
704 - :release:`0.16.0 <2017-04-18>`
705 - :feature:`232` Add support for ``.yml``-suffixed config files (in addition to
706 ``.yaml``, ``.json`` and ``.py``.) Thanks to Matthias Lehmann for the
707 original request & Greg Back for an early patch.
708 - :feature:`418` Enhance ability of client libraries to override config
709 filename prefixes. This includes modifications to related functionality, such
710 as how env var prefixes are configured.
711
712 .. warning::
713 **This is a backwards incompatible change** if:
714
715 - you were relying on the ``env_prefix`` keyword argument to
716 `Config.__init__ <invoke.config.Config.__init__>`; it is now the
717 ``prefix`` or ``env_prefix`` class attribute, depending.
718 - or the kwarg/attribute of the same name in `Program.__init__
719 <invoke.program.Program.__init__>`; you should now be subclassing
720 ``Config`` and using its ``env_prefix`` attribute;
721 - or if you were relying on how standalone ``Config`` objects defaulted to
722 having a ``None`` value for ``env_prefix``, and thus loaded env vars
723 without an ``INVOKE_`` style prefix.
724
725 See new documentation for this functionality at
726 :ref:`customizing-config-defaults` for details.
727
728 - :feature:`309` Overhaul how task execution contexts/configs are handled, such
729 that all contexts in a session now share the same config object, and thus
730 user modifications are preserved between tasks. This has been done in a
731 manner that should not break things like collection-based config (which may
732 still differ from task to task.)
733
734 .. warning::
735 **This is a backwards incompatible change** if you were relying on the
736 post-0.12 behavior of cloning config objects between each task execution.
737 Make sure to investigate if you find tasks affecting one another in
738 unexpected ways!
739
740 - :support:`-` Fixed some Python 2.6 incompatible string formatting that snuck
741 in recently.
742 - :feature:`-` Switched the order of the first two arguments of
743 `Config.__init__ <invoke.config.Config.__init__>`, so that the ``overrides``
744 kwarg becomes the first positional argument.
745
746 This supports the common use case of making a `Config <invoke.config.Config>`
747 object that honors the system's core/global defaults; previously, because
748 ``defaults`` was the first argument, you'd end up replacing those core
749 defaults instead of merging with them.
750
751 .. warning::
752 **This is a backwards incompatible change** if you were creating custom
753 ``Config`` objects via positional, instead of keyword, arguments. It should
754 have no effect otherwise.
755
756 - :feature:`-` `Context.sudo <invoke.context.Context.sudo>` no longer prompts
757 the user when the configured sudo password is empty; thus, an empty sudo
758 password and a ``sudo`` program configured to require one will result in an
759 exception.
760
761 The runtime prompting for a missing password was a temporary holdover from
762 Fabric v1, and in retrospect is undesirable. We may add it back in as an
763 opt-in behavior (probably via subclassing) in the future if anybody misses
764 it.
765
766 .. warning::
767 **This is a backwards incompatible change**, if you were relying on
768 ``sudo()`` prompting you for your password (vs configuring it). If you
769 *were* doing that, you can simply switch to ``run("sudo <command>")`` and
770 respond to the subprocess' sudo prompt by hand instead.
771
772 - :feature:`-` `Result <invoke.runners.Result>` and `UnexpectedExit
773 <invoke.exceptions.UnexpectedExit>` objects now have a more useful ``repr()``
774 (and in the case of ``UnexpectedExit``, a distinct ``repr()`` from their
775 preexisting ``str()``.)
776 - :bug:`432 major` Tighten application of IO thread ``join`` timeouts (in `run
777 <invoke.runners.Runner.run>`) to only happen when :issue:`351` appears
778 actually present. Otherwise, slow/overworked IO threads had a chance of being
779 joined before truly reading all data from the subprocess' pipe.
780 - :bug:`430 major` Fallback importing of PyYAML when Invoke has been installed
781 without its vendor directory, was still trying to import the vendorized
782 module names (e.g. ``yaml2`` or ``yaml3`` instead of simply ``yaml``). This
783 has been fixed, thanks to Athmane Madjoudj.
784 - :release:`0.15.0 <2017-02-14>`
785 - :bug:`426 major` `DataProxy <invoke.config.DataProxy>` based classes like
786 `Config <invoke.config.Config>` and `Context <invoke.context.Context>` didn't
787 like being `pickled <pickle>` or `copied <copy.copy>` and threw
788 ``RecursionError``. This has been fixed.
789 - :feature:`-` `Config <invoke.config.Config>`'s internals got cleaned up
790 somewhat; end users should not see much of a difference, but advanced
791 users or authors of extension code may notice the following:
792
793 - Direct modification of config data (e.g. ``myconfig.section.subsection.key
794 = 'value'`` in user/task code) is now stored in its own config 'level'/data
795 structure; previously such modifications simply mutated the central,
796 'merged' config cache. This makes it much easier to determine where a final
797 observed value came from, and prevents accidental data loss.
798 - Ditto for deleted values.
799 - Merging/reconciliation of the config levels now happens automatically when
800 data is loaded or modified, which not only simplifies the object's
801 lifecycle a bit but allows the previous change to function without
802 requiring users to call ``.merge()`` after every modification.
803
804 - :bug:`- major` Python 3's hashing rules differ from Python 2, specifically:
805
806 A class that overrides ``__eq__()`` and does not define ``__hash__()`` will
807 have its ``__hash__()`` implicitly set to None.
808
809 `Config <invoke.config.Config>` (specifically, its foundational class
810 `DataProxy <invoke.config.DataProxy>`) only defined ``__eq__`` which,
811 combined with the above behavior, meant that ``Config`` objects appeared to
812 hash successfully on Python 2 but yielded ``TypeErrors`` on Python 3.
813
814 This has been fixed by explicitly setting ``__hash__ = None`` so that the
815 objects do not hash on either interpreter (there are no good immutable
816 attributes by which to define hashability).
817 - :bug:`- major` Configuration keys named ``config`` were inadvertently
818 exposing the internal dict representation of the containing config object,
819 instead of displaying the actual value stored in that key. (Thus, a set
820 config of ``mycontext.foo.bar.config`` would act as if it was the key/value
821 contents of the ``mycontext.foo.bar`` subtree.) This has been fixed.
822 - :feature:`421` Updated `Config.clone <invoke.config.Config.clone>` (and a few
823 other related areas) to replace use of `copy.deepcopy` with a less-rigorous
824 but also less-likely-to-explode recursive dict copier. This prevents
825 frustrating ``TypeErrors`` while still preserving barriers between different
826 tasks' configuration values.
827 - :feature:`-` `Config.clone <invoke.config.Config.clone>` grew a new ``into``
828 kwarg allowing client libraries with their own `~invoke.config.Config`
829 subclasses to easily "upgrade" vanilla Invoke config objects into their local
830 variety.
831 - :bug:`419 major` Optional parser arguments had a few issues:
832
833 - The :ref:`conceptual docs about CLI parsing <optional-values>` mentioned
834 them, but didn't actually show via example how to enable the feature,
835 implying (incorrectly) that they were active always by default. An example
836 has been added.
837 - Even when enabled, they did not function correctly when their default
838 values were of type ``bool``; in this situation, trying to give a value (vs
839 just giving the flag name by itself) caused a parser error. This has been
840 fixed.
841
842 Thanks to ``@ouroboroscoding`` for the report.
843 - :support:`204` (via :issue:`412`) Fall back to globally-installed copies of
844 our vendored dependencies, if the import from the ``vendor`` tree fails. In
845 normal situations this won't happen, but it allows advanced users or
846 downstream maintainers to nuke ``vendor/`` and prefer explicitly installed
847 packages of e.g. ``six``, ``pyyaml`` or ``fluidity``. Thanks to Athmane
848 Madjoudj for the patch.
849 - :bug:`- major` Fix configuration framework such that nested or dict-like
850 config values may be compared with regular dicts. Previously, doing so caused
851 an ``AttributeError`` (as regular dicts lack a ``.config``).
852 - :bug:`413 major` Update behavior of ``DataProxy`` (used within
853 `~invoke.context.Context` and `~invoke.config.Config`) again, fixing two
854 related issues:
855
856 - Creating new configuration keys via attribute access wasn't possible: one
857 had to do ``config['foo'] = 'bar'`` because ``config.foo = 'bar'`` would
858 set a real attribute instead of touching configuration.
859 - Supertypes' attributes weren't being considered during the "is this a real
860 attribute on ``self``?" test, leading to different behavior between a
861 nested config-value-as-attribute and a top-level Context/Config one.
862
863 - :release:`0.14.0 <2016-12-05>`
864 - :bug:`349 major` Display the string representation of
865 `~invoke.exceptions.UnexpectedExit` when handling it inside of
866 `~invoke.program.Program` (including regular ``inv``), if any output was
867 hidden during the ``run`` that generated it.
868
869 Previously, we only exited with the exception's stored exit code, meaning
870 failures of ``run(..., hide=True)`` commands were unexpectedly silent.
871 (Library-style use of the codebase didn't have this problem, since tracebacks
872 aren't muted.)
873
874 While implementing this change, we also tweaked the overall display of
875 ``UnexpectedExit`` so it's a bit more consistent & useful:
876
877 - noting "hey, you ran with ``pty=True``, so there's no stderr";
878 - showing only the last 10 lines of captured output in the error message
879 (users can, of course, always manually handle the error & access the full
880 thing if desired);
881 - only showing a given stream when it was not already printed to the user's
882 terminal (i.e. if ``hide=False``, no captured output is shown in the error
883 text; if ``hide='stdout'``, only stdout is shown in the error text; etc.)
884
885 Thanks to Patrick Massot for the original bug report.
886
887 - :feature:`-` Expose the (normalized) value of `~invoke.runners.Runner.run`'s
888 ``hide`` parameter in its return-value `~invoke.runners.Result` objects.
889 - :bug:`288 major` Address a bug preventing reuse of Invoke as a custom
890 binstub, by moving ``--list`` into the "core args" set of flags present on
891 all Invoke-derived binstubs. Thanks to Jordon Mears for catch & patch.
892 - :bug:`283 major` Fix the concepts/library docs so the example of an explicit
893 ``namespace=`` argument correctly shows wrapping an imported task module in a
894 `~invoke.collection.Collection`. Thanks to ``@zaiste`` for the report.
895 - :bug:`- major` Fix ``DataProxy`` (used within `~invoke.context.Context` and
896 `~invoke.config.Config`) so that real attributes and methods which are
897 shadowed by configuration keys, aren't proxied to the config during regular
898 attribute get/set. (Such config keys are thus required to be accessed via
899 dict-style only, or (on `~invoke.context.Context`) via the explicit
900 ``.config`` attribute.)
901 - :bug:`58 major` Work around bugs in ``select()`` when handling subprocess
902 stream reads, which was causing poor behavior in many nontrivial interactive
903 programs (such as ``vim`` and other fullscreen editors, ``python`` and other
904 REPLs/shells, etc). Such programs should now be largely indistinguishable
905 from their behavior when run directly from a user's shell.
906 - :feature:`406` Update handling of Ctrl-C/``KeyboardInterrupt``, and
907 subprocess exit status pass-through, to be more correct than before:
908
909 - Submit the interrupt byte sequence ``\x03`` to stdin of all subprocesses,
910 instead of sending ``SIGINT``.
911
912 - This results in behavior closer to that of truly pressing Ctrl-C when
913 running subprocesses directly; for example, interactive programs like
914 ``vim`` or ``python`` now behave normally instead of prematurely
915 exiting.
916 - Of course, programs that would normally exit on Ctrl-C will still do
917 so!
918
919 - The exit statuses of subprocesses run with ``pty=True`` are more rigorously
920 checked (using `os.WIFEXITED` and friends), allowing us to surface the real
921 exit values of interrupted programs instead of manually assuming exit code
922 ``130``.
923
924 - Typically, this will be exit code ``-2``, but it is system dependent.
925 - Other, non-Ctrl-C-driven signal-related exits under PTYs should behave
926 better now as well - previously they could appear to exit ``0``!
927
928 - Non-subprocess-related ``KeyboardInterrupt`` (i.e. those generated when
929 running top level Python code outside of any ``run`` function calls)
930 will now trigger exit code ``1``, as that is how the Python interpreter
931 typically behaves if you ``KeyboardInterrupt`` it outside of a live
932 REPL.
933
934 .. warning::
935 These changes are **backwards incompatible** if you were relying on the
936 "exits ``130``" behavior added in version 0.13, or on the (incorrect)
937 ``SIGINT`` method of killing pty-driven subprocesses on Ctrl-C.
938
939 - :bug:`- major` Correctly raise ``TypeError`` when unexpected keyword
940 arguments are given to `~invoke.runners.Runner.run`.
941 - :feature:`-` Add a `~invoke.context.MockContext` class for easier testing of
942 user-written tasks and related client code. Includes adding a
943 :ref:`conceptual document on how to test Invoke-using code
944 <testing-user-code>`.
945 - :feature:`-` Update implementation of `~invoke.runners.Result` so it has
946 default values for all parameters/attributes. This allows it to be more
947 easily used when mocking ``run`` calls in client libraries' tests.
948
949 .. warning::
950 This is a backwards incompatible change if you are manually instantiating
951 `~invoke.runners.Result` objects with positional arguments: positional
952 argument order has changed. (Compare the API docs between versions to see
953 exactly how.)
954
955 - :feature:`294` Implement `Context.sudo <invoke.context.Context.sudo>`, which
956 wraps `~invoke.context.Context.run` inside a ``sudo`` command. It is capable
957 of auto-responding to ``sudo``'s password prompt with a configured password,
958 and raises a specific exception (`~invoke.exceptions.AuthFailure`) if that
959 password is rejected.
960 - :feature:`369` Overhaul the autoresponse functionality for `~invoke.run` so
961 it's significantly more extensible, both for its own sake and as part of
962 implementing :issue:`294` (see its own changelog entry for details).
963
964 .. warning::
965 This is a backwards incompatible change: the ``responses`` kwarg to
966 ``run()`` is now ``watchers``, and accepts a list of
967 `~invoke.watchers.StreamWatcher` objects (such as
968 `~invoke.watchers.Responder`) instead of a dict.
969
970 If you were using ``run(..., responses={'pattern': 'response'}``
971 previously, just update to instead use ``run(...,
972 watchers=[Responder('pattern', 'response')])``.
973
974 - :bug:`- major` Fix a bug in `Config.clone <invoke.config.Config.clone>` where
975 it was instantiating a new ``Config`` instead of a member of the subclass.
976 - :release:`0.13.0 <2016-06-09>`
977 - :feature:`114` Ripped off the band-aid and removed non-contextualized tasks
978 as an option; all tasks must now be contextualized (defined as ``def
979 mytask(context, ...)`` - see :ref:`defining-and-running-task-functions`) even
980 if not using the context. This simplifies the implementation as well as
981 users' conceptual models. Thanks to Bay Grabowski for the patch.
982
983 .. warning:: This is a backwards incompatible change!
984
985 - :bug:`350 major` (also :issue:`274`, :issue:`241`, :issue:`262`,
986 :issue:`242`, :issue:`321`, :issue:`338`) Clean up and reorganize
987 encoding-related parts of the code to avoid some of the more common or
988 egregious encode/decode errors surrounding clearly non-ASCII-compatible text.
989 Bug reports, assistance, feedback and code examples courtesy of Paul Moore,
990 Vlad Frolov, Christian Aichinger, Fotis Gimian, Daniel Nunes, and others.
991 - :bug:`351 major` Protect against ``run`` deadlocks involving exceptions in
992 I/O threads & nontrivial amounts of unread data in the corresponding
993 subprocess pipe(s). This situation should now always result in exceptions
994 instead of hangs.
995 - :feature:`259` (also :issue:`280`) Allow updating (or replacing) subprocess
996 shell environments, via the ``env`` and ``replace_env`` kwargs to
997 `~invoke.runners.Runner.run`. Thanks to Fotis Gimian for the report,
998 ``@philtay`` for an early version of the final patch, and Erich Heine & Vlad
999 Frolov for feedback.
1000 - :feature:`67` Added ``shell`` option to `~invoke.runners.Runner.run`,
1001 allowing control of the shell used when invoking commands. Previously,
1002 ``pty=True`` used ``/bin/bash`` and ``pty=False`` (the default) used
1003 ``/bin/sh``; the new unified default value is ``/bin/bash``.
1004
1005 Thanks to Jochen Breuer for the report.
1006 - :bug:`152 major` (also :issue:`251`, :issue:`331`) Correctly handle
1007 ``KeyboardInterrupt`` during `~invoke.runners.Runner.run`, re: both mirroring
1008 the interrupt signal to the subprocess *and* capturing the local exception
1009 within Invoke's CLI handler (so there's no messy traceback, just exiting with
1010 code ``130``).
1011
1012 Thanks to Peter Darrow for the report, and to Mika Eloranta & Máté Farkas for
1013 early versions of the patchset.
1014 - :support:`319` Fixed an issue resulting from :issue:`255` which
1015 caused problems with how we generate release wheels (notably, some releases
1016 such as 0.12.1 fail when installing from wheels on Python 2).
1017
1018 .. note::
1019 As part of this fix, the next release will distribute individual Python 2
1020 and Python 3 wheels instead of one 'universal' wheel. This change should be
1021 transparent to users.
1022
1023 Thanks to ``@ojos`` for the initial report and Frazer McLean for some
1024 particularly useful feedback.
1025 - :release:`0.12.2 <2016-02-07>`
1026 - :support:`314 backported` (Partial fix.) Update ``MANIFEST.in`` so source
1027 distributions include some missing project-management files (e.g. our
1028 internal ``tasks.py``). This makes unpacked sdists more useful for things
1029 like running the doc or build tasks.
1030 - :bug:`303` Make sure `~invoke.run` waits for its IO worker threads to cleanly
1031 exit (such as allowing a ``finally`` block to revert TTY settings) when
1032 ``KeyboardInterrupt`` (or similar) aborts execution in the main thread.
1033 Thanks to Tony S Yu and Máté Farkas for the report.
1034 - :release:`0.12.1 <2016-02-03>`
1035 - :bug:`308` Earlier changes to TTY detection & its use in determining features
1036 such as stdin pass-through, were insufficient to handle edge cases such as
1037 nested Invoke sessions or piped stdin to Invoke processes. This manifested as
1038 hangs and ``OSError`` messages about broken pipes.
1039
1040 The issue has been fixed by overhauling all related code to use more specific
1041 and accurate checks (e.g. examining just ``fileno`` and/or just ``isatty``).
1042
1043 Thanks to Tuukka Mustonen and Máté Farkas for the report (and for enduring
1044 the subsequent flood of the project maintainer's stream-of-consciousness
1045 ticket updates).
1046 - :bug:`305` (also :issue:`306`) Fix up some test-suite issues causing failures
1047 on Windows/Appveyor. Thanks to Paul Moore.
1048 - :bug:`289` Handful of issues, all fallout from :issue:`289`, which failed to
1049 make it out the door for 0.12.0. More are on the way but these should address
1050 blockers for some users:
1051
1052 * Windows support for the new stdin replication functionality (this was
1053 totally blocking Windows users, as reported in :issue:`302` - sorry!);
1054 * Stdin is now mirrored to stdout when no PTY is present, so you can see
1055 what you're typing (plus a new `~invoke.runners.Runner.run` option and
1056 config param, ``echo_stdin``, allowing user override of this behavior);
1057 * Exposed the stdin read loop's sleep time as `Runner.input_sleep
1058 <invoke.runners.Runner.input_sleep>`;
1059 * Sped up some tests a bit.
1060
1061 - :release:`0.12.0 <2016-01-12>`
1062 - :bug:`257 major` Fix a RecursionError under Python 3 due to lack of
1063 ``__deepcopy__`` on `~invoke.tasks.Call` objects. Thanks to Markus
1064 Zapke-Gründemann for initial report and Máté Farkas for the patch.
1065 - :support:`265` Update our Travis config to select its newer build
1066 infrastructure and also run on PyPy3. Thanks to Omer Katz.
1067 - :support:`254` Add an ``exclude`` option in our ``setup.py`` so setuptools
1068 doesn't try loading our vendored PyYAML's Python 2 sub-package under Python 3
1069 (or vice versa - though all reports were from Python 3 users). Thanks to
1070 ``@yoshiya0503`` for catch & initial patch.
1071 - :feature:`68` Disable Python's bytecode caching by default, as it complicates
1072 our typical use case (frequently-changing .py files) and offers little
1073 benefit for human-facing startup times. Bytecode caching can be explicitly
1074 re-enabled by specifying ``--write-pyc`` at runtime. Thanks to Jochen Breuer
1075 for feature request and ``@brutus`` for initial patchset.
1076 - :support:`144` Add code-coverage reporting to our CI builds (albeit `CodeCov
1077 <https://codecov.io>`_ instead of `coveralls.io <https://coveralls.io>`_).
1078 Includes rejiggering our project-specific coverage-generating tasks. Thanks
1079 to David Baumgold for the original request/PR and to Justin Abrahms for the
1080 tipoff re: CodeCov.
1081 - :bug:`297 major` Ignore leading and trailing underscores when turning task
1082 arguments into CLI flag names.
1083 - :bug:`296 major` Don't mutate ``sys.path`` on collection load if task's
1084 parent directory is already on ``sys.path``.
1085 - :bug:`295 major` Make sure that `~invoke.run`'s ``hide=True`` also disables
1086 echoing. Otherwise, "hidden" helper ``run`` calls will still pollute output
1087 when run as e.g. ``invoke --echo ...``.
1088 - :feature:`289` (also :issue:`263`) Implement :ref:`autoresponding
1089 <autoresponding>` for `~invoke.run`.
1090 - :support:`-` Removed official Python 3.2 support; sibling projects also did
1091 this recently, it's simply not worth the annoyance given the userbase size.
1092 - :feature:`228` (partial) Modified and expanded implementation of
1093 `~invoke.executor.Executor`, `~invoke.tasks.Task` and `~invoke.tasks.Call` to
1094 make implementing task parameterization easier.
1095 - :support:`-` Removed the ``-H`` short flag, leaving just ``--hide``. This was
1096 done to avoid conflicts with Fabric's host-oriented ``-H`` flag. Favoritism
1097 is real! Apologies.
1098
1099 .. warning:: This change is backwards compatible if you used ``-H``.
1100
1101 - :feature:`173` Overhauled top level CLI functionality to allow reusing
1102 Invoke for distinct binaries, optionally with bundled task namespaces as
1103 subcommands. As a side effect, this functionality is now much more extensible
1104 to boot. Thanks to Erich Heine for feedback/suggestions during development.
1105
1106 .. warning::
1107 This change is backwards incompatible if you imported anything from the
1108 ``invoke.cli`` module (which is now rearchitected as
1109 `~invoke.program.Program`). It should be transparent to everybody else.
1110
1111 .. seealso:: :ref:`reusing-as-a-binary`
1112
1113 - :bug:`- major` Fixed a bug in the parser where ``invoke --takes-optional-arg
1114 avalue --anotherflag`` was incorrectly considering ``--anotherflag`` to be an
1115 ambiguity error (as if ``avalue`` had not been given to
1116 ``--takes-optional-arg``.
1117 - :release:`0.11.1 <2015-09-07>`
1118 - :support:`- backported` Fix incorrect changelog URL in package metadata.
1119 - :release:`0.11.0 <2015-09-07>`
1120 - :feature:`-` Add a ``.command`` attribute to `~invoke.runners.Result` to
1121 preserve the command executed for post-execution introspection.
1122 - :feature:`-` Detect local controlling terminal size
1123 (`~invoke.terminals.pty_size`) and apply that information when creating
1124 pseudoterminals in `~invoke.run` when ``pty=True``.
1125 - :bug:`- major` Display stdout instead of stderr in the ``repr()`` of
1126 `~invoke.exceptions.Failure` objects, when a pseudo-terminal was used.
1127 Previously, failure display focused on the stderr stream, which is always
1128 empty under pseudo-terminals.
1129 - :bug:`- major` Correctly handle situations where `sys.stdin` has been
1130 replaced with an object lacking ``.fileno`` (e.g., some advanced Python
1131 shells, headless code execution tools, etc). Previously, this situation
1132 resulted in an ``AttributeError``.
1133 - :bug:`- major` Capture & reraise exceptions generated by command execution I/O
1134 threads, in the main thread, as a `~invoke.exceptions.ThreadException`.
1135 - :feature:`235` Allow custom stream objects to be used in `~invoke.run` calls,
1136 to be used instead of the defaults of ``sys.stdout``/``sys.stderr``.
1137
1138 .. warning::
1139 This change required a major cleanup/rearchitecture of the command
1140 execution implementation. The vendored ``pexpect`` module has been
1141 completely removed and the API of the `~invoke.runners.Runner` class has
1142 changed dramatically (though **the API for run() itself has not**).
1143
1144 Be aware there may be edge-case terminal behaviors which have changed or
1145 broken as a result of removing ``pexpect``. Please report these as bugs! We
1146 expect to crib small bits of what ``pexpect`` does but need concrete test
1147 cases first.
1148
1149 - :bug:`234 major` (also :issue:`243`) Preserve task-module load location when
1150 creating explicit collections with
1151 `~invoke.collection.Collection.from_module`; when this was not done,
1152 project-local config files were not loading correctly. Thanks to ``@brutus``
1153 and Jan Willems for initial report & troubleshooting, and to Greg Back for
1154 identifying the fix.
1155 - :bug:`237 major` Completion output lacked "inverse" flag names (e.g.
1156 ``--no-myoption`` as a boolean negative version of a defaulting-to-True
1157 boolean ``myoption``). This has been corrected.
1158 - :bug:`239 major` Completion erroneously presented core flags instead of
1159 per-task flags when both are present in the invocation being completed (e.g.
1160 ``inv --debug my_task -<tab>``). This has been fixed.
1161 - :bug:`238 major` (partial fix) Update the ``zsh`` completion script to
1162 account for use of the ``--collection`` core flag.
1163 - :support:`-` Additional rearranging of ``run``/``Runner`` related concerns
1164 for improved subclassing, organization, and use in other libraries,
1165 including:
1166
1167 * Changed the name of the ``runner`` module to ``runners``.
1168 * Moved the top level ``run`` function from its original home in
1169 ``invoke.runner`` to `invoke.__init__ <invoke>`, to reflect the fact that
1170 it's now simply a convenience wrapper around ``Runner``.
1171 * Tweaked the implementation of `~invoke.runners.Runner` so it can
1172 reference `~invoke.context.Context` objects (useful for anticipated
1173 subclasses).
1174
1175 .. warning::
1176 These are backwards incompatible changes if your code was doing any imports
1177 from the ``invoke.runner`` module (including especially
1178 ``invoke.runner.run``, which is now only ``invoke.run``). Function
1179 signatures have **not** changed.
1180
1181 - :support:`224` Add a completion script for the ``fish`` shell, courtesy of
1182 Jaime Marquínez Ferrándiz.
1183 - :release:`0.10.1 <2015-03-17>`
1184 - :support:`- backported` Tweak README to reflect recent(-ish) changes in
1185 ``pip`` re: users who install the development version via ``pip`` instead of
1186 using git.
1187 - :release:`0.10.0 <2015-03-17>`
1188 - :feature:`104` Add core CLI flag ``--complete`` to support shell tab
1189 completion scripts, and add some 'blessed' such scripts for bash (3 and 4)
1190 and zsh. Thanks to Ivan Malison and Andrew Roberts for providing discussion &
1191 early patchsets.
1192 - :support:`-` Reorganize `~invoke.runners.Runner`, `~invoke.runners.Local` and
1193 ``invoke.runner.run`` for improved distribution of responsibilities &
1194 downstream subclassing.
1195
1196 .. warning::
1197 This includes backwards incompatible changes to the API signature of most
1198 members of the ``invoke.runner`` module, including ``invoke.runner.run``.
1199 (However, in the case of ``invoke.runner.run``, the changes are mostly in
1200 the later, optional keyword arguments.)
1201
1202 - :feature:`219` Fall back to non-PTY command execution in situations where
1203 ``pty=True`` but no PTY appears present. See `~invoke.runners.Local` for
1204 details.
1205 - :support:`212` Implement basic linting support using ``flake8``, and apply
1206 formatting changes to satisfy said linting. As part of this shakeup, also
1207 changed all old-style (``%s``) string formatting to new-style (``{0}``).
1208 Thanks to Collin Anderson for the foundational patch.
1209 - :support:`215` (also :issue:`213`, :issue:`214`) Tweak tests & configuration
1210 sections of the code to include Windows compatibility. Thanks to Paul Moore.
1211 - :bug:`201 major` (also :issue:`211`) Replace the old, first-draft gross
1212 monkeypatched Popen code used for ``invoke.runner.run`` with a
1213 non-monkeypatched approach that works better on non-POSIX platforms like
1214 Windows, and also attempts to handle encoding and locale issues more
1215 gracefully (meaning: at all gracefully).
1216
1217 Specifically, the new approach uses threading instead of ``select.select``,
1218 and performs explicit encoding/decoding based on detected or explicitly
1219 expressed encodings.
1220
1221 Major thanks to Paul Moore for an enormous amount of
1222 testing/experimentation/discussion, as well as the bulk of the code changes
1223 themselves.
1224
1225 .. warning::
1226 The top level ``invoke.runner.run`` function has had a minor signature
1227 change: the sixth positional argument used to be ``runner`` and is now
1228 ``encoding`` (with ``runner`` now being the seventh positional argument).
1229
1230 - :feature:`147` Drastically overhaul/expand the configuration system to
1231 account for multiple configuration levels including (but not limited to) file
1232 paths, environment variables, and Python-level constructs (previously the
1233 only option). See :ref:`configuration` for details. Thanks to Erich Heine for
1234 his copious feedback on this topic.
1235
1236 .. warning::
1237 This is technically a backwards incompatible change, though some existing
1238 user config-setting code may continue to work as-is. In addition, this
1239 system may see further updates before 1.0.
1240
1241 - :bug:`191 major` Bypass ``pexpect``'s automatic command splitting to avoid
1242 issues running complex nested/quoted commands under a pty. Credit to
1243 ``@mijikai`` for noticing the problem.
1244 - :bug:`183 major` Task docstrings whose first line started on the same line as
1245 the opening quote(s) were incorrectly presented in ``invoke --help <task>``.
1246 This has been fixed by using `inspect.getdoc`. Thanks to Pekka Klärck for the
1247 catch & suggested fix.
1248 - :bug:`180 major` Empty invocation (e.g. just ``invoke`` with no flags or
1249 tasks, and when no default task is defined) no longer printed help output,
1250 instead complaining about the lack of default task. It now prints help again.
1251 Thanks to Brent O'Connor for the catch.
1252 - :bug:`175 major` ``autoprint`` did not function correctly for tasks stored
1253 in sub-collections; this has been fixed. Credit: Matthias Lehmann.
1254 - :release:`0.9.0 <2014-08-26>`
1255 - :bug:`165 major` Running ``inv[oke]`` with no task names on a collection
1256 containing a default task should (intuitively) have run that default task,
1257 but instead did nothing. This has been fixed.
1258 - :bug:`167 major` Running the same task multiple times in one CLI session was
1259 horribly broken; it works now. Thanks to Erich Heine for the report.
1260 - :bug:`119 major` (also :issue:`162`, :issue:`113`) Better handle
1261 platform-sensitive operations such as pty size detection or use, either
1262 replacing with platform-specific implementations or raising useful
1263 exceptions. Thanks to Gabi Davar and (especially) Paul Moore, for feedback &
1264 original versions of the final patchset.
1265 - :feature:`136` Added the ``autoprint`` flag to
1266 `invoke.tasks.Task`/`@task <invoke.tasks.task>`, allowing users to set up
1267 tasks which act as both subroutines & "print a result" CLI tasks. Thanks to
1268 Matthias Lehmann for the original patch.
1269 - :bug:`162 major` Adjust platform-sensitive imports so Windows users don't
1270 encounter import-time exceptions. Thanks to Paul Moore for the patch.
1271 - :support:`169` Overhaul the Sphinx docs into two trees, one for main project
1272 info and one for versioned API docs.
1273 - :bug:`- major` Fixed a sub-case of the already-mostly-fixed :issue:`149` so
1274 the error message works usefully even with no explicit collection name given.
1275 - :release:`0.8.2 <2014-06-15>`
1276 - :bug:`149` Print a useful message to stderr when Invoke can't find the
1277 requested collection/tasks file, instead of displaying a traceback.
1278 - :bug:`145` Ensure a useful message is displayed (instead of a confusing
1279 exception) when listing empty task collections.
1280 - :bug:`142` The refactored Loader class failed to account for the behavior of
1281 `imp.find_module` when run against packages (vs modules) and was exploding at
1282 load time. This has been fixed. Thanks to David Baumgold for catch & patch.
1283 - :release:`0.8.1 <2014-06-09>`
1284 - :bug:`140` Revert incorrect changes to our ``setup.py`` regarding detection
1285 of sub-packages such as the vendor tree & the parser. Also add additional
1286 scripting to our Travis-CI config to catch this class of error in future.
1287 Thanks to Steven Loria and James Cox for the reports.
1288 - :release:`0.8.0 <2014-06-08>`
1289 - :feature:`135` (also bugs :issue:`120`, :issue:`123`) Implement post-tasks to
1290 match pre-tasks, and allow control over the arguments passed to both (via
1291 `invoke.tasks.call`). For details, see :ref:`pre-post-tasks`.
1292
1293 .. warning::
1294 Pre-tasks were overhauled a moderate amount to implement this feature;
1295 they now require references to **task objects** instead of **task
1296 names**. This is a backwards incompatible change.
1297
1298 - :support:`25` Trim a bunch of time off the test suite by using mocking and
1299 other tools instead of dogfooding a bunch of subprocess spawns.
1300 - :bug:`128 major` Positional arguments containing underscores were not
1301 exporting to the parser correctly; this has been fixed. Thanks to J. Javier
1302 Maestro for catch & patch.
1303 - :bug:`121 major` Add missing help output denoting inverse Boolean options
1304 (i.e. ``--[no-]foo`` for a ``--foo`` flag whose value defaults to true.)
1305 Thanks to Andrew Roberts for catch & patch.
1306 - :support:`118` Update the bundled ``six`` plus other minor tweaks to support
1307 files. Thanks to Matt Iversen.
1308 - :feature:`115` Make it easier to reuse Invoke's primary CLI machinery in
1309 other (non-Invoke-distributed) bin-scripts. Thanks to Noah Kantrowitz.
1310 - :feature:`110` Add task docstrings' 1st lines to ``--list`` output. Thanks to
1311 Hiroki Kiyohara for the original PR (with assists from Robert Read and James
1312 Thigpen.)
1313 - :support:`117` Tidy up ``setup.py`` a bit, including axing the (broken)
1314 `distutils` support. Thanks to Matt Iversen for the original PR & followup
1315 discussion.
1316 - :feature:`87` (also :issue:`92`) Rework the loader module such that recursive
1317 filesystem searching is implemented, and is used instead of searching
1318 `sys.path`.
1319
1320 This adds the behavior most users expect or are familiar with from Fabric 1
1321 or similar tools; and it avoids nasty surprise collisions with other
1322 installed packages containing files named ``tasks.py``.
1323
1324 Thanks to Michael Hahn for the original report & PR, and to Matt Iversen for
1325 providing the discovery algorithm used in the final version of this change.
1326
1327 .. warning::
1328 This is technically a backwards incompatible change (reminder: we're not
1329 at 1.0 yet!). You'll only notice if you were relying on adding your tasks
1330 module to ``sys.path`` and then calling Invoke elsewhere on the
1331 filesystem.
1332
1333 - :support:`-` Refactor the `invoke.runners.Runner` module to differentiate
1334 what it means to run a command in the abstract, from execution specifics. Top
1335 level API is unaffected.
1336 - :bug:`131 major` Make sure one's local tasks module is always first in
1337 ``sys.path``, even if its parent directory was already somewhere else in
1338 ``sys.path``. This ensures that local tasks modules never become hidden by
1339 third-party ones. Thanks to ``@crccheck`` for the early report and to Dorian
1340 Puła for assistance fixing.
1341 - :bug:`116 major` Ensure nested config overrides play nicely with default
1342 tasks and pre-tasks.
1343 - :bug:`127 major` Fill in tasks' exposed ``name`` attribute with body name if
1344 explicit name not given.
1345 - :feature:`124` Add a ``--debug`` flag to the core parser to enable easier
1346 debugging (on top of existing ``INVOKE_DEBUG`` env var.)
1347 - :feature:`125` Improve output of Failure exceptions when printed.
1348 - :release:`0.7.0 <2014.01.28>`
1349 - :feature:`109` Add a ``default`` kwarg to
1350 `invoke.collection.Collection.add_task` allowing per-collection control over
1351 default tasks.
1352 - :feature:`108` Update `invoke.collection.Collection.from_module` to accept
1353 useful shorthand arguments for tweaking the `invoke.collection.Collection`
1354 objects it creates (e.g. name, configuration.)
1355 - :feature:`107` Update configuration merging behavior for more flexible reuse
1356 of imported task modules, such as parameterizing multiple copies of a module
1357 within a task tree.
1358 - :release:`0.6.1 <2013.11.21>`
1359 - :bug:`96` Tasks in subcollections which set explicit names (via e.g.
1360 ``@task(name='foo')``) were not having those names honored. This is fixed.
1361 Thanks to Omer Katz for the report.
1362 - :bug:`98` **BACKWARDS INCOMPATIBLE CHANGE!** Configuration merging has been
1363 reversed so outer collections' config settings override inner collections.
1364 This makes distributing reusable modules significantly less silly.
1365 - :release:`0.6.0 <2013.11.21>`
1366 - :bug:`86 major` Task arguments named with an underscore broke the help feature;
1367 this is now fixed. Thanks to Stéphane Klein for the catch.
1368 - :feature:`89` Implemented configuration for distributed task modules: can set
1369 config options in `invoke.collection.Collection` objects and they are made
1370 available to contextualized tasks.
1371 - :release:`0.5.1 <2013.09.15>`
1372 - :bug:`81` Fall back to sane defaults for PTY sizes when autodetection gives
1373 insane results. Thanks to ``@akitada`` for the patch.
1374 - :bug:`83` Fix a bug preventing underscored keyword arguments from working
1375 correctly as CLI flags (e.g. ``mytask --my-arg`` would not map back correctly
1376 to ``mytask(my_arg=...)``.) Credit: ``@akitada``.
1377 - :release:`0.5.0 <2013.08.16>`
1378 - :feature:`57` Optional-value flags added - e.g. ``--foo`` tells the parser to
1379 set the ``foo`` option value to True; ``--foo myval`` sets the value to
1380 "myval". The built-in ``--help`` option now leverages this feature for
1381 per-task help (e.g. ``--help`` displays global help, ``--help mytask``
1382 displays help for ``mytask`` only.)
1383 - :bug:`55 major` A bug in our vendored copy of ``pexpect`` clashed with a
1384 Python 2->3 change in import behavior to prevent Invoke from running on
1385 Python 3 unless the ``six`` module was installed in one's environment. This
1386 was fixed - our vendored ``pexpect`` now always loads its sibling vendored
1387 ``six`` correctly.