Please note
This documentation is for the in-development
(1.0) version of Fabric. To view documentation for the
stable (0.9) release, please click here.
Changes in version 1.0
This page lists all significant changes made between versions 0.9 and 1.0 of
Fabric.
- contains and append
previously had the filename argument in the second position, whereas all
other functions in the module had filename as the first argument. In 1.0,
these two functions were brought in line with the rest of
files.
- sudo‘s signature used to be sudo(command, shell, user,
pty); to be consistent with run, the last two kwargs
have been swapped: its signature is now sudo(command, shell, pty, user).
- The reboot operation has been added, providing a way for
Fabric to issue a reboot command and then reconnect after the system has
restarted.
- Added a puts utility function, which allows greater control
over fabfile-generated (as opposed to Fabric-generated) output.
- Also added fastprint, an alias to puts
allowing for convenient unbuffered, non-newline-terminated printing.
- local now returns the same “rich” string object as
run/sudo do, so that it is a
string containing the command’s stdout (if capture=True) or the empty
string (if capture=False) which exposes the ``.failed
and .return_code attributes, and so forth.
- Fixed a bug where Fabric’s own internal fabfile would pre-empt the user’s
fabfile due to a PYTHONPATH order issue. User fabfiles are now always loaded
at the front of the PYTHONPATH during import.
- fab -d now displays a well formatted message for tasks that
have no docstring defined.
- local now honors cd.
- Added functionality for loading fabfiles which are Python packages
(directories) instead of just modules (single files.) See
Fabfile discovery.
- Disabled some DeprecationWarnings thrown by Paramiko when that library is
imported into Fabric under Python 2.6.
- Added support for arbitrary command-line-driven anonymous tasks via fab
[options] -- [shell command]. See Arbitrary remote shell commands.
- Full tracebacks during aborts are now displayed if the user has opted to see
debug-level output. Fixes #52.
- run, sudo and
local now provide access to their standard error
(stderr) as an attribute on the return value, alongside e.g. .failed.
Fixes #55.
- Added output lines informing the user of which tasks are being executed (e.g.
[myserver] Executing task 'foo'.)
- Added path context manager for modifying commands’
effective $PATH.
- Added support for lazy (callable) role definition values in env.roledefs.
- Added environment variable (always_use_pty) and command-line flag
(--pty) for global control over the
run/sudo pty argument.
- Added convenience .succeeded attribute to the return values of
run/sudo/local
which is simply the opposite of the .failed attribute.
- Added contrib.django module with basic Django
integration.
- Added colors module with basic color output support.
- Modified rsync_project to honor existing SSH port
and identity file settings. Thanks to Mitch Matuson and Morgan Goose.
- Added prefix context manager for easier management
of persistent state across commands.
- Refactored SSH disconnection code out of the main fab loop into
disconnect_all, allowing library users to avoid problems
with non-fabfile Python scripts hanging after execution finishes.
- Various other minor bugfixes and code tweaks.