Hello community, here is the log from the commit of package python-Fabric for openSUSE:Factory checked in at 2013-09-26 19:52:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Fabric (Old) and /work/SRC/openSUSE:Factory/.python-Fabric.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Fabric" Changes: -------- --- /work/SRC/openSUSE:Factory/python-Fabric/python-Fabric.changes 2013-08-07 20:52:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-Fabric.new/python-Fabric.changes 2013-09-26 19:52:40.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Sep 25 14:27:59 UTC 2013 - [email protected] + +- Update to version 1.8.0 + + [Feature] #910: Added a keyword argument to rsync_project to configure + the default options. Thanks to @moorepants for the patch. + + [Support] #984: Make this changelog easier to read! Now with per-release + sections, generated automatically from the old timeline source format. + + [Feature] #931: Allow overriding of abort behavior via a custom + exception-returning callable set as env.abort_exception. + +------------------------------------------------------------------- Old: ---- Fabric-1.7.0.tar.gz New: ---- Fabric-1.8.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Fabric.spec ++++++ --- /var/tmp/diff_new_pack.08gxI9/_old 2013-09-26 19:52:42.000000000 +0200 +++ /var/tmp/diff_new_pack.08gxI9/_new 2013-09-26 19:52:42.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-Fabric -Version: 1.7.0 +Version: 1.8.0 Release: 0 Summary: Fabric is a simple, Pythonic tool for remote execution and deployment License: BSD-2-Clause ++++++ Fabric-1.7.0.tar.gz -> Fabric-1.8.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/Fabric.egg-info/PKG-INFO new/Fabric-1.8.0/Fabric.egg-info/PKG-INFO --- old/Fabric-1.7.0/Fabric.egg-info/PKG-INFO 2013-07-26 23:41:49.000000000 +0200 +++ new/Fabric-1.8.0/Fabric.egg-info/PKG-INFO 2013-09-21 02:32:00.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: Fabric -Version: 1.7.0 +Version: 1.8.0 Summary: Fabric is a simple, Pythonic tool for remote execution and deployment. Home-page: http://fabfile.org Author: Jeff Forcier @@ -8,7 +8,7 @@ License: UNKNOWN Description: To find out what's new in this version of Fabric, please see `the changelog - <http://docs.fabfile.org/en/1.7/changelog.html>`_. + <http://docs.fabfile.org/en/1.8/changelog.html>`_. You can also install the `in-development version <https://github.com/fabric/fabric/tarball/master#egg=fabric-dev>`_ using diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/Fabric.egg-info/SOURCES.txt new/Fabric-1.8.0/Fabric.egg-info/SOURCES.txt --- old/Fabric-1.7.0/Fabric.egg-info/SOURCES.txt 2013-07-26 23:41:49.000000000 +0200 +++ new/Fabric-1.8.0/Fabric.egg-info/SOURCES.txt 2013-09-21 02:32:00.000000000 +0200 @@ -19,10 +19,10 @@ docs/index.rst docs/installation.rst docs/roadmap.rst +docs/troubleshooting.rst docs/tutorial.rst docs/_static/rtd.css docs/_templates/layout.html -docs/_templates/page.html docs/api/contrib/console.rst docs/api/contrib/django.rst docs/api/contrib/files.rst @@ -78,7 +78,7 @@ tests/client.key tests/client.key.pub tests/fake_filesystem.py -tests/integration.py +tests/mock_streams.py tests/private.key tests/server.py tests/test_context_managers.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/PKG-INFO new/Fabric-1.8.0/PKG-INFO --- old/Fabric-1.7.0/PKG-INFO 2013-07-26 23:41:49.000000000 +0200 +++ new/Fabric-1.8.0/PKG-INFO 2013-09-21 02:32:00.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: Fabric -Version: 1.7.0 +Version: 1.8.0 Summary: Fabric is a simple, Pythonic tool for remote execution and deployment. Home-page: http://fabfile.org Author: Jeff Forcier @@ -8,7 +8,7 @@ License: UNKNOWN Description: To find out what's new in this version of Fabric, please see `the changelog - <http://docs.fabfile.org/en/1.7/changelog.html>`_. + <http://docs.fabfile.org/en/1.8/changelog.html>`_. You can also install the `in-development version <https://github.com/fabric/fabric/tarball/master#egg=fabric-dev>`_ using diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/_templates/page.html new/Fabric-1.8.0/docs/_templates/page.html --- old/Fabric-1.7.0/docs/_templates/page.html 2013-06-21 22:55:26.000000000 +0200 +++ new/Fabric-1.8.0/docs/_templates/page.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -{% extends "!page.html" %} -{% block extrahead %} -{{ super() }} -<style type="text/css"> - span.changelog-support {color: #4070A0;} - span.changelog-bug {color: #A04040;} - span.changelog-feature {color: #40A056;} - a.changelog-release {font-weight: bold;} -</style> -{% endblock %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/changelog.rst new/Fabric-1.8.0/docs/changelog.rst --- old/Fabric-1.7.0/docs/changelog.rst 2013-07-26 23:17:31.000000000 +0200 +++ new/Fabric-1.8.0/docs/changelog.rst 2013-09-21 02:31:43.000000000 +0200 @@ -4,32 +4,21 @@ Changelog ========= -How to read -=========== - -This changelog lists each bugfix, feature addition, etc in the order they were -checked into Fabric's source code repository. Published releases are bolded, -dated and inserted at the appropriate points in the timeline. - -To find out the changes included in a given release, simply look at the entries -between that release and the previous one from the same release line (e.g. -1.1.4 down through 1.1.3 would be the effective changelog for the 1.1.4 -release.) - -Bugfixes to older release lines are always forward-ported to newer releases, -and this is reflected in the changelog. Thus, the changelog for e.g. 1.2.2 -might contain entries for the 1.1 and 1.0 lines as well, because those changes -would have also been included in the 1.2 line. - - -Changelog -========= - +* :release:`1.8.0 <2013-09-20>` +* :feature:`931` Allow overriding of `.abort` behavior via a custom + exception-returning callable set as :ref:`env.abort_exception + <abort-exception>`. Thanks to Chris Rose for the patch. +* :support:`984 backported` Make this changelog easier to read! Now with + per-release sections, generated automatically from the old timeline source + format. +* :feature:`910` Added a keyword argument to rsync_project to configure the + default options. Thanks to ``@moorepants`` for the patch. +* :release:`1.7.0 <2013-07-26>` * :release:`1.6.2 <2013-07-26>` * :feature:`925` Added `contrib.files.is_link <.is_link>`. Thanks to `@jtangas` for the patch. * :feature:`922` Task argument strings are now displayed when using - :cmdopt:`fab -d <-d>`. Thanks to Kevin Qiu for the patch. + :option:`fab -d <-d>`. Thanks to Kevin Qiu for the patch. * :bug:`912` Leaving ``template_dir`` un-specified when using `.upload_template` in Jinja mode used to cause ``'NoneType' has no attribute 'startswith'`` errors. This has been fixed. Thanks to Erick Yellott for catch @@ -50,12 +39,13 @@ Nenciarini for the catch. * :feature:`826` Enable sudo extraction of compressed archive via `use_sudo` kwarg in `.upload_project`. Thanks to ``@abec`` for the patch. -* :bug:`694` Allow users to work around ownership issues in the default remote - login directory: add ``temp_dir`` kwarg for explicit specification of which - "bounce" folder to use when calling `.put` with ``use_sudo=True``. Thanks to - Devin Bayer for the report & Dieter Plaetinck / Jesse Myers for suggesting - the workaround. -* :bug:`882` Fix getting files when the remote CWD contains spaces +* :bug:`694 major` Allow users to work around ownership issues in the default + remote login directory: add ``temp_dir`` kwarg for explicit specification of + which "bounce" folder to use when calling `.put` with ``use_sudo=True``. + Thanks to Devin Bayer for the report & Dieter Plaetinck / Jesse Myers for + suggesting the workaround. +* :bug:`882` Fix a `.get` bug regarding spaces in remote working directory + names. Thanks to Chris Rose for catch & patch. * :release:`1.6.1 <2013-05-23>` * :bug:`868` Substantial speedup of parallel tasks by removing an unnecessary blocking timeout in the ``JobQueue`` loop. Thanks to Simo Kinnunen for the @@ -66,22 +56,21 @@ * :feature:`812` Add ``use_glob`` option to `.put` so users trying to upload real filenames containing glob patterns (``*``, ``[`` etc) can disable the default globbing behavior. Thanks to Michael McHugh for the patch. -* :bug:`844` Allow users to disable Fabric's auto-escaping in `.run`/`.sudo`. - Thanks to Christian Long and Michael McHugh for the patch. -* :bug:`84` Fixed problem with missing -r flag in Mac OS X sed version. +* :bug:`864 major` Allow users to disable Fabric's auto-escaping in + `.run`/`.sudo`. Thanks to Christian Long and Michael McHugh for the patch. * :bug:`870` Changes to shell env var escaping highlighted some extraneous and now damaging whitespace in `with path(): <.path>`. This has been removed and a regression test added. * :bug:`871` Use of string mode values in `put(local, remote, mode="NNNN") <.put>` would sometimes cause ``Unsupported operand`` errors. This has been fixed. -* :bug:`84` Fixed problem with missing -r flag in Mac OS X sed version. Thanks - to Konrad Hałas for the patch. +* :bug:`84 major` Fixed problem with missing -r flag in Mac OS X sed version. + Thanks to Konrad Hałas for the patch. * :bug:`861` Gracefully handle situations where users give a single string literal to ``env.hosts``. Thanks to Bill Tucker for catch & patch. * :bug:`367` Expand paths with tilde inside (``contrib.files``). Thanks to Konrad Hałas for catch & patch. -* :feature:`845` Downstream synchronization option implemented for +* :feature:`845 backported` Downstream synchronization option implemented for `~fabric.contrib.project.rsync_project`. Thanks to Antonio Barrero for the patch. * :release:`1.6.0 <2013-03-01>` @@ -123,9 +112,9 @@ * :bug:`791` Cast `~fabric.operations.reboot`'s ``wait`` parameter to a numeric type in case the caller submitted a string by mistake. Thanks to Thomas Schreiber for the patch. -* :bug:`703` Add a ``shell`` kwarg to many methods in `~fabric.contrib.files` - to help avoid conflicts with `~fabric.context_managers.cd` and similar. - Thanks to `@mikek` for the patch. +* :bug:`703 major` Add a ``shell`` kwarg to many methods in + `~fabric.contrib.files` to help avoid conflicts with + `~fabric.context_managers.cd` and similar. Thanks to `@mikek` for the patch. * :feature:`730` Add :ref:`env.system_known_hosts/--system-known-hosts <system-known-hosts>` to allow loading a user-specified system-level SSH ``known_hosts`` file. Thanks to Roy Smith for the patch. @@ -175,17 +164,17 @@ Lundberg and Github user `@acrish` for providing the original patches to both Fabric and Paramiko. -* :feature:`684` (also :issue:`569`) Update how `~fabric.decorators.task` wraps - task functions to preserve additional metadata; this allows decorated - functions to play nice with Sphinx autodoc. Thanks to Jaka Hudoklin for catch - & patch. +* :feature:`684 backported` (also :issue:`569`) Update how + `~fabric.decorators.task` wraps task functions to preserve additional + metadata; this allows decorated functions to play nice with Sphinx autodoc. + Thanks to Jaka Hudoklin for catch & patch. * :support:`103` (via :issue:`748`) Long standing Sphinx autodoc issue requiring error-prone duplication of function signatures in our API docs has been fixed. Thanks to Alex Morega for the patch. -* :bug:`767` Fix (and add test for) regression re: having linewise output +* :bug:`767 major` Fix (and add test for) regression re: having linewise output automatically activate when parallelism is in effect. Thanks to Alexander Fortin and Dustin McQuay for the bug reports. -* :bug:`736` Ensure context managers that build env vars play nice with +* :bug:`736 major` Ensure context managers that build env vars play nice with ``contextlib.nested`` by deferring env var reference to entry time, not call time. Thanks to Matthew Tretter for catch & patch. * :feature:`763` Add :option:`--initial-password-prompt <-I>` to allow @@ -207,16 +196,16 @@ `~fabric.operations.sudo`. Thanks to Antti Kaihola for the pull request. * :feature:`725` Updated `~fabric.operations.local` to allow override of which local shell is used. Thanks to Mustafa Khattab. -* :bug:`704` Fix up a bunch of Python 2.x style ``print`` statements to be - forwards compatible. Thanks to Francesco Del Degan for the patch. +* :bug:`704 major` Fix up a bunch of Python 2.x style ``print`` statements to + be forwards compatible. Thanks to Francesco Del Degan for the patch. * :feature:`491` (also :feature:`385`) IPv6 host string support. Thanks to Max Arnold for the patch. * :feature:`699` Allow `name` attribute on file-like objects for get/put. Thanks to Peter Lyons for the pull request. -* :bug:`711` `~fabric.sftp.get` would fail when filenames had % in their path. - Thanks to John Begeman -* :bug:`702` `~fabric.operations.require` failed to test for "empty" values in - the env keys it checks (e.g. +* :bug:`711 major` `~fabric.sftp.get` would fail when filenames had % in their + path. Thanks to John Begeman +* :bug:`702 major` `~fabric.operations.require` failed to test for "empty" + values in the env keys it checks (e.g. ``require('a-key-whose-value-is-an-empty-list')`` would register a successful result instead of alerting that the value was in fact empty. This has been fixed, thanks to Rich Schumacher. @@ -226,10 +215,10 @@ * :bug:`693` Fixed edge case where ``abort`` driven failures within parallel tasks could result in a top level exception (a ``KeyError``) regarding error handling. Thanks to Marcin Kuźmiński for the report. -* :support:`681` Fixed outdated docstring for `~fabric.decorators.runs_once` - which claimed it would get run multiple times in parallel mode. That behavior - was fixed in an earlier release but the docs were not updated. Thanks to - Jan Brauer for the catch. +* :support:`681 backported` Fixed outdated docstring for + `~fabric.decorators.runs_once` which claimed it would get run multiple times + in parallel mode. That behavior was fixed in an earlier release but the docs + were not updated. Thanks to Jan Brauer for the catch. * :release:`1.4.3 <2012-07-06>` * :release:`1.3.8 <2012-07-06>` * :feature:`263` Shell environment variable support for @@ -247,9 +236,9 @@ honors :ref:`env.path <env-path>`. Thanks to `@floledermann <https://github.com/floledermann>`_ for the catch. * :bug:`652` Show available commands when aborting on invalid command names. -* :support:`651` Added note about nesting ``with`` statements on Python 2.6+. - Thanks to Jens Rantil for the patch. -* :bug:`649` Don't swallow non-`abort`-driven exceptions in parallel mode. +* :support:`651 backported` Added note about nesting ``with`` statements on + Python 2.6+. Thanks to Jens Rantil for the patch. +* :bug:`649` Don't swallow non-``abort``-driven exceptions in parallel mode. Fabric correctly printed such exceptions, and returned them from `~fabric.tasks.execute`, but did not actually cause the child or parent processes to halt with a nonzero status. This has been fixed. @@ -263,12 +252,12 @@ * :feature:`646` Allow specification of which local streams to use when `~fabric.operations.run`/`~fabric.operations.sudo` print the remote stdout/stderr, via e.g. ``run("command", stderr=sys.stdout)``. -* :support:`645` Update Sphinx docs to work well when run out of a source - tarball as opposed to a Git checkout. Thanks again to `@Arfrever` for the - catch. -* :support:`640` (also :issue:`644`) Update packaging manifest so sdist - tarballs include all necessary test & doc files. Thanks to Mike Gilbert and - `@Arfrever` for catch & patch. +* :support:`645 backported` Update Sphinx docs to work well when run out of a + source tarball as opposed to a Git checkout. Thanks again to `@Arfrever` for + the catch. +* :support:`640 backported` (also :issue:`644`) Update packaging manifest so + sdist tarballs include all necessary test & doc files. Thanks to Mike Gilbert + and `@Arfrever` for catch & patch. * :feature:`627` Added convenient ``quiet`` and ``warn_only`` keyword arguments to `~fabric.operations.run`/`~fabric.operations.sudo` which are aliases for ``settings(hide('everything'), warn_only=True)`` and @@ -279,18 +268,18 @@ * :feature:`633` Allow users to turn off host list deduping by setting :ref:`env.dedupe_hosts <dedupe_hosts>` to ``False``. This enables running the same task multiple times on a single host, which was previously not possible. -* :support:`634` Clarified that `~fabric.context_managers.lcd` does no special - handling re: the user's current working directory, and thus relative paths - given to it will be relative to ``os.getcwd()``. Thanks to `@techtonik - <https://github.com/techtonik>`_ for the catch. +* :support:`634 backported` Clarified that `~fabric.context_managers.lcd` does + no special handling re: the user's current working directory, and thus + relative paths given to it will be relative to ``os.getcwd()``. Thanks to + `@techtonik <https://github.com/techtonik>`_ for the catch. * :release:`1.4.2 <2012-05-07>` * :release:`1.3.7 <2012-05-07>` * :bug:`562` Agent forwarding would error out or freeze when multiple uses of the forwarded agent were used per remote invocation (e.g. a single `~fabric.operations.run` command resulting in multiple Git or SVN checkouts.) This has been fixed thanks to Steven McDonald and GitHub user `@lynxis`. -* :support:`626` Clarity updates to the tutorial. Thanks to GitHub user `m4z` - for the patches. +* :support:`626 backported` Clarity updates to the tutorial. Thanks to GitHub + user `m4z` for the patches. * :bug:`625` `~fabric.context_managers.hide`/`~fabric.context_managers.show` did not correctly restore prior display settings if an exception was raised inside the block. This has been fixed. @@ -374,7 +363,7 @@ * :feature:`474` `~fabric.tasks.execute` now allows you to access the executed task's return values, by itself returning a dictionary whose keys are the host strings executed against. -* :bug:`487` Overhauled the regular expression escaping performed in +* :bug:`487 major` Overhauled the regular expression escaping performed in `~fabric.contrib.files.append` and `~fabric.contrib.files.contains` to try and handle more corner cases. Thanks to Neilen Marais for the patch. * :support:`532` Reorganized and cleaned up the output of ``fab --help``. @@ -442,10 +431,10 @@ * :release:`1.3.2 <2011-11-07>` * :release:`1.2.4 <2011-11-07>` * :release:`1.1.6 <2011-11-07>` -* :support:`459` Update our `setup.py` files to note that PyCrypto released - 2.4.1, which fixes the setuptools problems. -* :support:`467` (also :issue:`468`, :issue:`469`) Handful of documentation - clarification tweaks. Thanks to Paul Hoffman for the patches. +* :support:`459 backported` Update our `setup.py` files to note that PyCrypto + released 2.4.1, which fixes the setuptools problems. +* :support:`467 backported` (also :issue:`468`, :issue:`469`) Handful of + documentation clarification tweaks. Thanks to Paul Hoffman for the patches. * :release:`1.3.1 <2011-10-24>` * :bug:`457` Ensured that Fabric fast-fails parallel tasks if any child processes encountered errors. Previously, multi-task invocations would @@ -487,8 +476,8 @@ ``env`` values for keys which did not exist outside the context manager block. It now works as expected. Thanks to Will Maier for the catch and suggested solution. -* :support:`393` Fixed a typo in an example code snippet in the task docs. - Thanks to Hugo Garza for the catch. +* :support:`393 backported` Fixed a typo in an example code snippet in the task + docs. Thanks to Hugo Garza for the catch. * :bug:`396` :option:`--shortlist` broke after the addition of :option:`--list-format <-F>` and no longer displayed the short list format correctly. This has been fixed. @@ -502,7 +491,8 @@ * :bug:`417` :ref:`abort-on-prompts` would incorrectly abort when set to True, even if both password and host were defined. This has been fixed. Thanks to Valerie Ishida for the report. -* :support:`416` Updated documentation to reflect move from Redmine to Github. +* :support:`416 backported` Updated documentation to reflect move from Redmine + to Github. * :bug:`389` Fixed/improved error handling when Paramiko import fails. Thanks to Brian Luft for the catch. * :release:`1.2.0 <2011-07-12>` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/conf.py new/Fabric-1.8.0/docs/conf.py --- old/Fabric-1.7.0/docs/conf.py 2013-07-23 00:28:38.000000000 +0200 +++ new/Fabric-1.8.0/docs/conf.py 2013-09-21 02:05:21.000000000 +0200 @@ -13,74 +13,10 @@ from __future__ import with_statement import os -import re import sys import types from datetime import datetime -# Custom ReST roles. -from docutils.parsers.rst import roles -from docutils import nodes, utils - -issue_types = ('bug', 'feature', 'support') - -def issues_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - """ - Use: :issue|bug|feature|support:`ticket number` - - When invoked as :issue:, turns into just a "#NN" hyperlink to Github. - - When invoked otherwise, turns into "[Type] <#NN hyperlink>: ". - """ - # Old-style 'just the issue link' behavior - issue_no = utils.unescape(text) - ref = "https://github.com/fabric/fabric/issues/" + issue_no - link = nodes.reference(rawtext, '#' + issue_no, refuri=ref, **options) - ret = [link] - # Additional 'new-style changelog' stuff - if name in issue_types: - which = '[<span class="changelog-%s">%s</span>]' % ( - name, name.capitalize() - ) - ret = [ - nodes.raw(text=which, format='html'), - nodes.inline(text=" "), - link, - nodes.inline(text=":") - ] - return ret, [] - -for x in issue_types + ('issue',): - roles.register_local_role(x, issues_role) - - -year_arg_re = re.compile(r'^(.+?)\s*(?<!\x00)<(.*?)>$', re.DOTALL) - -def release_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - """ - Invoked as :release:`N.N.N <YYYY-MM-DD>`. - - Turns into: <b>YYYY-MM-DD</b>: released <b><a>Fabric N.N.N</a></b>, with - the link going to the Github source page for the tag. - """ - # Make sure year has been specified - match = year_arg_re.match(text) - if not match: - msg = inliner.reporter.error("Must specify release date!") - return [inliner.problematic(rawtext, rawtext, msg)], [msg] - number, date = match.group(1), match.group(2) - return [ - nodes.strong(text=date), - nodes.inline(text=": released "), - nodes.reference( - text="Fabric %s" % number, - refuri="https://github.com/fabric/fabric/tree/%s" % number, - classes=['changelog-release'] - ) - ], [] -roles.register_local_role('release', release_role) - - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -90,7 +26,11 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc'] +extensions = ['sphinx.ext.autodoc', 'releases'] + +# 'releases' (changelog) settings +releases_issue_uri = "https://github.com/fabric/fabric/issues/%s" +releases_release_uri = "https://github.com/fabric/fabric/tree/%s" # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/index.rst new/Fabric-1.8.0/docs/index.rst --- old/Fabric-1.7.0/docs/index.rst 2013-07-17 20:19:42.000000000 +0200 +++ new/Fabric-1.8.0/docs/index.rst 2013-09-21 02:05:21.000000000 +0200 @@ -68,6 +68,7 @@ installation development faq + troubleshooting roadmap Tutorial @@ -100,6 +101,12 @@ Some frequently encountered questions, coupled with answers/solutions/excuses, may be found on the :doc:`faq` page. +Troubleshooting +--------------- + +Before asking for help or filing a bug, make sure you've read our +:doc:`document on troubleshooting <troubleshooting>`. + .. _api_docs: API documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/troubleshooting.rst new/Fabric-1.8.0/docs/troubleshooting.rst --- old/Fabric-1.7.0/docs/troubleshooting.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/Fabric-1.8.0/docs/troubleshooting.rst 2013-09-21 02:05:21.000000000 +0200 @@ -0,0 +1,39 @@ +=============== +Troubleshooting +=============== + +Stuck? Having a problem? Here are the steps to try before you submit a bug +report. + +* **Make sure you're on the latest version.** If you're not on the most recent + version, your problem may have been solved already! Upgrading is always the + best first step. +* **Try older versions.** If you're already *on* the latest Fabric, try rolling + back a few minor versions (e.g. if on 1.7, try Fabric 1.5 or 1.6) and see if + the problem goes away. This will help the devs narrow down when the problem + first arose in the commit log. +* **Try switching up your Paramiko.** Fabric relies heavily on the Paramiko + library for its SSH functionality, so try applying the above two steps to + your Paramiko install as well. + + .. note:: + Fabric versions sometimes have different Paramiko dependencies - so to + try older Paramikos you may need to downgrade Fabric as well. + +* **Make sure Fabric is really the problem.** If your problem is in the + behavior or output of a remote command, try recreating it without Fabric + involved: + + * Run Fabric with ``--show=debug`` and look for the ``run:`` or ``sudo:`` + line about the command in question. Try running that exact command, + including any ``/bin/bash`` wrapper, remotely and see what happens. This + may find problems related to the bash or sudo wrappers. + * Execute the command (both the normal version, and the 'unwrapped' version + seen via ``--show=debug``) from your local workstation using ``ssh``, + e.g.:: + + $ ssh -t mytarget "my command" + + The ``-t`` flag matches Fabric's default behavior of enabling a PTY + remotely. This helps identify apps that behave poorly when run in a + non-shell-spawned PTY. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/docs/usage/env.rst new/Fabric-1.8.0/docs/usage/env.rst --- old/Fabric-1.7.0/docs/usage/env.rst 2013-07-26 23:17:20.000000000 +0200 +++ new/Fabric-1.8.0/docs/usage/env.rst 2013-09-21 02:18:16.000000000 +0200 @@ -106,6 +106,25 @@ .. seealso:: :option:`--set` +.. _abort-exception: + +``abort_exception`` +------------------- + +**Default:** ``None`` + +Fabric normally handles aborting by printing an error message to stderr and +calling ``sys.exit(1)``. This setting allows you to override that behavior +(which is what happens when ``env.abort_exception`` is ``None``.) + +Give it a callable which takes a string (the error message that would have been +printed) and returns an exception instance. That exception object is then +raised instead of ``SystemExit`` (which is what ``sys.exit`` does.) + +Much of the time you'll want to simply set this to an exception class, as those +fit the above description perfectly (callable, take a string, return an +exception instance.) E.g. ``env.abort_exception = MyExceptionClass``. + .. _abort-on-prompts: ``abort_on_prompts`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/fabric/contrib/project.py new/Fabric-1.8.0/fabric/contrib/project.py --- old/Fabric-1.7.0/fabric/contrib/project.py 2013-07-26 23:17:20.000000000 +0200 +++ new/Fabric-1.8.0/fabric/contrib/project.py 2013-09-21 02:05:21.000000000 +0200 @@ -16,8 +16,17 @@ __all__ = ['rsync_project', 'upload_project'] @needs_host -def rsync_project(remote_dir, local_dir=None, exclude=(), delete=False, - extra_opts='', ssh_opts='', capture=False, upload=True): +def rsync_project( + remote_dir, + local_dir=None, + exclude=(), + delete=False, + extra_opts='', + ssh_opts='', + capture=False, + upload=True, + default_opts='-pthrvz' +): """ Synchronize a remote directory with the current project directory via rsync. @@ -70,6 +79,8 @@ * ``capture``: Sent directly into an inner `~fabric.operations.local` call. * ``upload``: a boolean controlling whether file synchronization is performed up or downstream. Upstream by default. + * ``default_opts``: the default rsync options ``-pthrvz``, override if + desired (e.g. to remove verbosity, etc). Furthermore, this function transparently honors Fabric's port and SSH key settings. Calling this function when the current host string contains a @@ -80,12 +91,14 @@ constructed by this function is the following:: rsync [--delete] [--exclude exclude[0][, --exclude[1][, ...]]] \\ - -pthrvz [extra_opts] <local_dir> <host_string>:<remote_dir> + [default_opts] [extra_opts] <local_dir> <host_string>:<remote_dir> .. versionadded:: 1.4.0 The ``ssh_opts`` keyword argument. .. versionadded:: 1.4.1 The ``capture`` keyword argument. + .. versionadded:: 1.8.0 + The ``default_opts`` keyword argument. """ # Turn single-string exclude into a one-item list for consistency if not hasattr(exclude, '__iter__'): @@ -112,9 +125,10 @@ 'delete': '--delete' if delete else '', 'exclude': exclude_opts % exclusions, 'rsh': rsh_string, - 'extra': extra_opts + 'default': default_opts, + 'extra': extra_opts, } - options = "%(delete)s%(exclude)s -pthrvz %(extra)s %(rsh)s" % options_map + options = "%(delete)s%(exclude)s %(default)s %(extra)s %(rsh)s" % options_map # Get local directory if local_dir is None: local_dir = '../' + getcwd().split(sep)[-1] @@ -146,8 +160,8 @@ a copy of ``local_dir`` will appear as a subdirectory of ``remote_dir``) and defaults to the remote user's home directory. - ``use_sudo`` specifies which method should be used when executing commands - remotely. ``sudo`` will be used if use_sudo is True, otherwise ``run`` will + ``use_sudo`` specifies which method should be used when executing commands + remotely. ``sudo`` will be used if use_sudo is True, otherwise ``run`` will be used. This function makes use of the ``tar`` and ``gzip`` programs/libraries, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/fabric/state.py new/Fabric-1.8.0/fabric/state.py --- old/Fabric-1.7.0/fabric/state.py 2013-07-26 23:17:20.000000000 +0200 +++ new/Fabric-1.8.0/fabric/state.py 2013-09-21 02:18:16.000000000 +0200 @@ -303,6 +303,7 @@ # preserving DRY: anything in here is generally not settable via the command # line. env = _AttributeDict({ + 'abort_exception': None, 'again_prompt': 'Sorry, try again.', 'all_hosts': [], 'combine_stderr': True, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/fabric/utils.py new/Fabric-1.8.0/fabric/utils.py --- old/Fabric-1.7.0/fabric/utils.py 2013-07-26 23:17:20.000000000 +0200 +++ new/Fabric-1.8.0/fabric/utils.py 2013-09-21 02:18:16.000000000 +0200 @@ -27,7 +27,11 @@ if output.aborts: sys.stderr.write(red("\nFatal error: %s\n" % str(msg))) sys.stderr.write(red("\nAborting.\n")) - sys.exit(1) + + if env.abort_exception: + raise env.abort_exception(msg) + else: + sys.exit(1) def warn(msg): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/fabric/version.py new/Fabric-1.8.0/fabric/version.py --- old/Fabric-1.7.0/fabric/version.py 2013-07-26 23:41:44.000000000 +0200 +++ new/Fabric-1.8.0/fabric/version.py 2013-09-21 02:05:21.000000000 +0200 @@ -9,7 +9,7 @@ from os.path import abspath, dirname -VERSION = (1, 7, 0, 'final', 0) +VERSION = (1, 8, 0, 'final', 0) def git_sha(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/tests/integration.py new/Fabric-1.8.0/tests/integration.py --- old/Fabric-1.7.0/tests/integration.py 2013-07-17 20:19:42.000000000 +0200 +++ new/Fabric-1.8.0/tests/integration.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -# "Integration test" for Fabric to be run occasionally / before releasing. -# Executes idempotent/nonthreatening commands against localhost by default. - -from __future__ import with_statement - -from fabric.api import * - - -@hosts('localhost') -def test(): - flags = (True, False) - funcs = (run, sudo) - cmd = "ls /" - line = "#" * 72 - for shell in flags: - for pty in flags: - for combine_stderr in flags: - for func in funcs: - print(">>> %s(%s, shell=%s, pty=%s, combine_stderr=%s)" % ( - func.func_name, cmd, shell, pty, combine_stderr)) - print(line) - func( - cmd, - shell=shell, - pty=pty, - combine_stderr=combine_stderr - ) - print(line + "\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/tests/mock_streams.py new/Fabric-1.8.0/tests/mock_streams.py --- old/Fabric-1.7.0/tests/mock_streams.py 1970-01-01 01:00:00.000000000 +0100 +++ new/Fabric-1.8.0/tests/mock_streams.py 2013-09-21 02:05:21.000000000 +0200 @@ -0,0 +1,85 @@ +""" +Stand-alone stream mocking decorator for easier imports. +""" +from functools import wraps +import sys +from StringIO import StringIO # No need for cStringIO at this time + + +class CarbonCopy(StringIO): + """ + A StringIO capable of multiplexing its writes to other buffer objects. + """ + + def __init__(self, buffer='', cc=None): + """ + If ``cc`` is given and is a file-like object or an iterable of same, + it/they will be written to whenever this StringIO instance is written + to. + """ + StringIO.__init__(self, buffer) + if cc is None: + cc = [] + elif hasattr(cc, 'write'): + cc = [cc] + self.cc = cc + + def write(self, s): + StringIO.write(self, s) + for writer in self.cc: + writer.write(s) + + +def mock_streams(which): + """ + Replaces a stream with a ``StringIO`` during the test, then restores after. + + Must specify which stream (stdout, stderr, etc) via string args, e.g.:: + + @mock_streams('stdout') + def func(): + pass + + @mock_streams('stderr') + def func(): + pass + + @mock_streams('both') + def func() + pass + + If ``'both'`` is specified, not only will both streams be replaced with + StringIOs, but a new combined-streams output (another StringIO) will appear + at ``sys.stdall``. This StringIO will resemble what a user sees at a + terminal, i.e. both streams intermingled. + """ + both = (which == 'both') + stdout = (which == 'stdout') or both + stderr = (which == 'stderr') or both + + def mocked_streams_decorator(func): + @wraps(func) + def inner_wrapper(*args, **kwargs): + if both: + sys.stdall = StringIO() + fake_stdout = CarbonCopy(cc=sys.stdall) + fake_stderr = CarbonCopy(cc=sys.stdall) + else: + fake_stdout, fake_stderr = StringIO(), StringIO() + if stdout: + my_stdout, sys.stdout = sys.stdout, fake_stdout + if stderr: + my_stderr, sys.stderr = sys.stderr, fake_stderr + try: + ret = func(*args, **kwargs) + finally: + if stdout: + sys.stdout = my_stdout + if stderr: + sys.stderr = my_stderr + if both: + del sys.stdall + return inner_wrapper + return mocked_streams_decorator + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/tests/test_utils.py new/Fabric-1.8.0/tests/test_utils.py --- old/Fabric-1.7.0/tests/test_utils.py 2013-07-26 23:17:20.000000000 +0200 +++ new/Fabric-1.8.0/tests/test_utils.py 2013-09-21 02:18:16.000000000 +0200 @@ -59,6 +59,17 @@ """ abort("Test") +class TestException(Exception): + pass + +@raises(TestException) +def test_abort_with_exception(): + """ + abort() should raise a provided exception + """ + with settings(abort_exception=TestException): + abort("Test") + @mock_streams('stderr') @with_patched_object(output, 'aborts', True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Fabric-1.7.0/tests/utils.py new/Fabric-1.8.0/tests/utils.py --- old/Fabric-1.7.0/tests/utils.py 2013-07-17 19:17:59.000000000 +0200 +++ new/Fabric-1.8.0/tests/utils.py 2013-09-21 02:05:21.000000000 +0200 @@ -1,10 +1,9 @@ from __future__ import with_statement -from StringIO import StringIO # No need for cStringIO at this time from contextlib import contextmanager from copy import deepcopy from fudge.patcher import with_patched_object -from functools import wraps, partial +from functools import partial from types import StringTypes import copy import getpass @@ -25,6 +24,7 @@ from fabric.network import normalize, to_dict from server import PORT, PASSWORDS, USER, HOST +from mock_streams import mock_streams class FabricTest(object): @@ -81,83 +81,6 @@ return os.path.exists(path) -class CarbonCopy(StringIO): - """ - A StringIO capable of multiplexing its writes to other buffer objects. - """ - - def __init__(self, buffer='', cc=None): - """ - If ``cc`` is given and is a file-like object or an iterable of same, - it/they will be written to whenever this StringIO instance is written - to. - """ - StringIO.__init__(self, buffer) - if cc is None: - cc = [] - elif hasattr(cc, 'write'): - cc = [cc] - self.cc = cc - - def write(self, s): - StringIO.write(self, s) - for writer in self.cc: - writer.write(s) - - -def mock_streams(which): - """ - Replaces a stream with a ``StringIO`` during the test, then restores after. - - Must specify which stream (stdout, stderr, etc) via string args, e.g.:: - - @mock_streams('stdout') - def func(): - pass - - @mock_streams('stderr') - def func(): - pass - - @mock_streams('both') - def func() - pass - - If ``'both'`` is specified, not only will both streams be replaced with - StringIOs, but a new combined-streams output (another StringIO) will appear - at ``sys.stdall``. This StringIO will resemble what a user sees at a - terminal, i.e. both streams intermingled. - """ - both = (which == 'both') - stdout = (which == 'stdout') or both - stderr = (which == 'stderr') or both - - def mocked_streams_decorator(func): - @wraps(func) - def inner_wrapper(*args, **kwargs): - if both: - sys.stdall = StringIO() - fake_stdout = CarbonCopy(cc=sys.stdall) - fake_stderr = CarbonCopy(cc=sys.stdall) - else: - fake_stdout, fake_stderr = StringIO(), StringIO() - if stdout: - my_stdout, sys.stdout = sys.stdout, fake_stdout - if stderr: - my_stderr, sys.stderr = sys.stderr, fake_stderr - try: - ret = func(*args, **kwargs) - finally: - if stdout: - sys.stdout = my_stdout - if stderr: - sys.stderr = my_stderr - if both: - del sys.stdall - return inner_wrapper - return mocked_streams_decorator - - def password_response(password, times_called=None, silent=True): """ Context manager which patches ``getpass.getpass`` to return ``password``. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
