]> review.fuel-infra Code Review - packages/trusty/python-pysaml2.git/commitdiff
Fixed python3 support.
authorThomas Goirand <zigo@debian.org>
Fri, 24 Apr 2015 09:56:25 +0000 (11:56 +0200)
committerThomas Goirand <zigo@debian.org>
Fri, 24 Apr 2015 09:56:25 +0000 (11:56 +0200)
Rewritten-From: 31068e25f97270b331acbf08775213f986a9a4de

debian/patches/fixed-python3-support.patch [moved from debian/patches/fixes-python2-to-python3-print-style.patch with 97% similarity]
debian/patches/series

similarity index 97%
rename from debian/patches/fixes-python2-to-python3-print-style.patch
rename to debian/patches/fixed-python3-support.patch
index bf758651716ae178c161ad121f149d2ea7731b07..9c17751c47b9738ce2bb88d381f94db0d8c07bf8 100644 (file)
@@ -1,7 +1,27 @@
-Description: Fixes print statement -> print functions
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ python-pysaml2 (2.0.0-2) experimental; urgency=medium
+ .
+   * Added Python 3 support.
 Author: Thomas Goirand <zigo@debian.org>
-Forwarded: no
-Last-Update: 2015-04-24
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
 
 --- python-pysaml2-2.0.0.orig/example/idp2/idp.py
 +++ python-pysaml2-2.0.0/example/idp2/idp.py
@@ -407,6 +427,39 @@ Last-Update: 2015-04-24
              raise
          then = time.strptime(elem.groups()[0] + "Z", TIME_FORMAT)
  
+--- python-pysaml2-2.0.0.orig/src/saml2/validate.py
++++ python-pysaml2-2.0.0/src/saml2/validate.py
+@@ -337,10 +337,10 @@ def valid(typ, value):
+ def _valid_instance(instance, val):
+     try:
+         val.verify()
+-    except NotValid, exc:
++    except NotValid as exc:
+         raise NotValid("Class '%s' instance: %s" % (
+             instance.__class__.__name__, exc.args[0]))
+-    except OutsideCardinality, exc:
++    except OutsideCardinality as exc:
+         raise NotValid(
+             "Class '%s' instance cardinality error: %s" % (
+                 instance.__class__.__name__, exc.args[0]))
+@@ -361,7 +361,7 @@ def valid_instance(instance):
+         try:
+             validate_value_type(instance.text.strip(),
+                                 instclass.c_value_type)
+-        except NotValid, exc:
++        except NotValid as exc:
+             raise NotValid("Class '%s' instance: %s" % (class_name,
+                                                         exc.args[0]))
+@@ -382,7 +382,7 @@ def valid_instance(instance):
+                     validate_value_type(value, spec)
+                 else:
+                     valid(typ, value)
+-            except (NotValid, ValueError), exc:
++            except (NotValid, ValueError) as exc:
+                 txt = ERROR_TEXT % (value, name, exc.args[0])
+                 raise NotValid("Class '%s' instance: %s" % (class_name, txt))
+         
 --- python-pysaml2-2.0.0.orig/tests/_test_80_p11_backend.py
 +++ python-pysaml2-2.0.0/tests/_test_80_p11_backend.py
 @@ -151,9 +151,9 @@ class TestPKCS11():
@@ -1705,8 +1758,9 @@ Last-Update: 2015-04-24
          try:
              self.server.parse_authn_request(_dict["SAMLRequest"][0], binding)
              status = None
-         except OtherError, oe:
+-        except OtherError, oe:
 -            print oe.args
++        except OtherError as oe:
 +            print(oe.args)
              status = s_utils.error_status_factory(oe)
  
index b1e73923046891fe44bbdaad0a463dba4eadc177..052b7be5c21d08d9f6ae68c6894c4d4b51a9a9ef 100644 (file)
@@ -1 +1 @@
-fixes-python2-to-python3-print-style.patch
+fixed-python3-support.patch