diff options
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/02_fix-python3-except-sintax-error.patch | 35 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 40 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 94bcdb0..5d8d812 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,11 @@ requests (0.10.1-1) UNRELEASED; urgency=low * debian/patches/01_do-not-use-python-certifi.patch - To verify SSL certificates for HTTPS requests, use the bundle provided by ca-certificates instead of python-certifi + * debian/patches/02_fix-python3-except-sintax-error.patches + - Fix SyntaxError on Python3 because "except Error, e" is not supported + anymore - -- Daniele Tricoli <eriol@mornie.org> Sun, 05 Feb 2012 02:56:07 +0100 + -- Daniele Tricoli <eriol@mornie.org> Sun, 05 Feb 2012 04:51:38 +0100 requests (0.8.2-1) unstable; urgency=low diff --git a/debian/patches/02_fix-python3-except-sintax-error.patch b/debian/patches/02_fix-python3-except-sintax-error.patch new file mode 100644 index 0000000..8e0eb52 --- /dev/null +++ b/debian/patches/02_fix-python3-except-sintax-error.patch @@ -0,0 +1,35 @@ +Description: Fix SyntaxError on Python3 because "except Error, e" is not + supported anymore. +Author: Daniele Tricoli <eriol@mornie.org> +Forwarded: https://github.com/kennethreitz/requests/pull/410 +Last-Update: 2012-02-05 + +--- a/requests/packages/oreos/structures.py ++++ b/requests/packages/oreos/structures.py +@@ -362,7 +362,7 @@ + """ + try: + return dict.pop(self, key)[0] +- except KeyError, e: ++ except KeyError as e: + if default is not _missing: + return default + raise KeyError(str(e)) +@@ -372,7 +372,7 @@ + try: + item = dict.popitem(self) + return (item[0], item[1][0]) +- except KeyError, e: ++ except KeyError as e: + raise KeyError(str(e)) + + def poplist(self, key): +@@ -389,7 +389,7 @@ + """Pop a ``(key, list)`` tuple from the dict.""" + try: + return dict.popitem(self) +- except KeyError, e: ++ except KeyError as e: + raise KeyError(str(e)) + + def __copy__(self): diff --git a/debian/patches/series b/debian/patches/series index 94aff1f..38c3ed3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 01_do-not-use-python-certifi.patch +02_fix-python3-except-sintax-error.patch |