diff -Nru python-botocore-0.29.0+repack/debian/changelog python-botocore-0.29.0+repack/debian/changelog --- python-botocore-0.29.0+repack/debian/changelog 2014-02-04 04:35:04.000000000 -0500 +++ python-botocore-0.29.0+repack/debian/changelog 2015-09-23 17:35:36.000000000 -0400 @@ -1,3 +1,10 @@ +python-botocore (0.29.0+repack-2ubuntu0.1) trusty-proposed; urgency=low + + * debian/patches/support-python3.4.1: Fix use of inspect with Python + 3.4.1 or later. (LP: #1499075) + + -- Evan Broder Wed, 23 Sep 2015 17:35:34 -0400 + python-botocore (0.29.0+repack-2) unstable; urgency=medium * debian/watch: Add debian version mangle. diff -Nru python-botocore-0.29.0+repack/debian/patches/series python-botocore-0.29.0+repack/debian/patches/series --- python-botocore-0.29.0+repack/debian/patches/series 2014-01-05 08:43:59.000000000 -0500 +++ python-botocore-0.29.0+repack/debian/patches/series 2015-09-23 17:15:09.000000000 -0400 @@ -1 +1,2 @@ remove-duplicated-code +support-python3.4.1 diff -Nru python-botocore-0.29.0+repack/debian/patches/support-python3.4.1 python-botocore-0.29.0+repack/debian/patches/support-python3.4.1 --- python-botocore-0.29.0+repack/debian/patches/support-python3.4.1 1969-12-31 19:00:00.000000000 -0500 +++ python-botocore-0.29.0+repack/debian/patches/support-python3.4.1 2015-09-23 17:30:36.000000000 -0400 @@ -0,0 +1,79 @@ +From: James Saryerwinnie +Description: Support python3.4.1 + . + Python 3.4.1 changed inspect.getargspec to raise if a function + contains either annotations or keyword-only args. This affects + functools.partials. +Origin: backport https://github.com/boto/botocore/commit/89626230754e534eb51017d5b13a546db755d71b +Bug: https://github.com/boto/botocore/pull/300 +Bug: https://github.com/aws/aws-cli/issues/800 +Reviewed-By: Evan Broder + +Index: python-botocore-0.29.0+repack/botocore/compat.py +=================================================================== +--- python-botocore-0.29.0+repack.orig/botocore/compat.py 2015-09-23 17:15:12.718917268 -0400 ++++ python-botocore-0.29.0+repack/botocore/compat.py 2015-09-23 17:19:58.534233692 -0400 +@@ -22,6 +22,7 @@ + import sys + import copy + import six ++import inspect + if six.PY3: + from six.moves import http_client + class HTTPHeaders(http_client.HTTPMessage): +@@ -34,6 +35,12 @@ + from urllib.parse import parse_qsl + from io import IOBase as _IOBase + file_type = _IOBase ++ ++ def accepts_kwargs(func): ++ # In python3.4.1, there's backwards incompatible ++ # changes when using getargspec with functools.partials. ++ return inspect.getfullargspec(func)[2] ++ + else: + from urllib import quote + from urllib import unquote +@@ -51,6 +58,9 @@ + for field, value in self._headers: + yield field + ++ def accepts_kwargs(func): ++ return inspect.getargspec(func)[2] ++ + try: + from collections import OrderedDict + except ImportError: +Index: python-botocore-0.29.0+repack/botocore/hooks.py +=================================================================== +--- python-botocore-0.29.0+repack.orig/botocore/hooks.py 2015-09-23 17:15:12.718917268 -0400 ++++ python-botocore-0.29.0+repack/botocore/hooks.py 2015-09-23 17:20:49.654295506 -0400 +@@ -19,10 +19,10 @@ + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + # IN THE SOFTWARE. + # +-import inspect + import six + from collections import defaultdict, deque + import logging ++from botocore.compat import accepts_kwargs + + logger = logging.getLogger(__name__) + +@@ -81,13 +81,11 @@ + + """ + try: +- argspec = inspect.getargspec(func) +- except TypeError: +- return False +- else: +- if argspec[2] is None: ++ if not accepts_kwargs(func): + raise ValueError("Event handler %s must accept keyword " + "arguments (**kwargs)" % func) ++ except TypeError: ++ return False + + + class EventHooks(BaseEventHooks):