[Python-modules-commits] r32912 - in packages/python-cryptography/trunk/debian/patches (1 file)

mithrandi at users.alioth.debian.org mithrandi at users.alioth.debian.org
Mon Jun 8 12:57:22 UTC 2015


    Date: Monday, June 8, 2015 @ 12:57:21
  Author: mithrandi
Revision: 32912

Fix up ipaddr patch some more.

Modified:
  packages/python-cryptography/trunk/debian/patches/ipaddr-fallback

Modified: packages/python-cryptography/trunk/debian/patches/ipaddr-fallback
===================================================================
--- packages/python-cryptography/trunk/debian/patches/ipaddr-fallback	2015-06-08 12:51:07 UTC (rev 32911)
+++ packages/python-cryptography/trunk/debian/patches/ipaddr-fallback	2015-06-08 12:57:21 UTC (rev 32912)
@@ -23,18 +23,11 @@
 Reviewed-By: <name and email of someone who approved the patch>
 Last-Update: <YYYY-MM-DD>
 
---- python-cryptography-0.9.orig/setup.py
-+++ python-cryptography-0.9/setup.py
-@@ -32,7 +32,7 @@ with open(os.path.join(src_dir, "cryptog
- VECTORS_DEPENDENCY = "cryptography_vectors=={0}".format(about['__version__'])
- 
- requirements = [
--    "idna",
-+    #"idna",
-     "pyasn1",
-     "six>=1.4.1",
-     "setuptools"
-@@ -42,7 +42,7 @@ if sys.version_info < (3, 4):
+Index: python-cryptography-0.9/setup.py
+===================================================================
+--- python-cryptography-0.9.orig/setup.py	2015-06-08 14:51:24.170383246 +0200
++++ python-cryptography-0.9/setup.py	2015-06-08 14:51:43.810674816 +0200
+@@ -42,7 +42,7 @@
      requirements.append("enum34")
  
  if sys.version_info < (3, 3):
@@ -43,22 +36,35 @@
  
  if platform.python_implementation() != "PyPy":
      requirements.append("cffi>=0.8")
---- python-cryptography-0.9.orig/src/cryptography/hazmat/backends/openssl/x509.py
-+++ python-cryptography-0.9/src/cryptography/hazmat/backends/openssl/x509.py
+Index: python-cryptography-0.9/src/cryptography/hazmat/backends/openssl/x509.py
+===================================================================
+--- python-cryptography-0.9.orig/src/cryptography/hazmat/backends/openssl/x509.py	2015-06-08 14:51:24.170383246 +0200
++++ python-cryptography-0.9/src/cryptography/hazmat/backends/openssl/x509.py	2015-06-08 14:56:37.671042066 +0200
 @@ -14,7 +14,10 @@
  from __future__ import absolute_import, division, print_function
  
  import datetime
 -import ipaddress
 +try:
-+    import ipaddress
++    from ipaddress import ip_address
 +except ImportError:
-+    import ipaddr as ipaddress
++    from ipaddr import IPAddress as ip_address
  from email.utils import parseaddr
  
  import idna
---- python-cryptography-0.9.orig/src/cryptography/x509.py
-+++ python-cryptography-0.9/src/cryptography/x509.py
+@@ -121,7 +124,7 @@
+         return x509.RegisteredID(x509.ObjectIdentifier(oid))
+     elif gn.type == backend._lib.GEN_IPADD:
+         return x509.IPAddress(
+-            ipaddress.ip_address(
++            ip_address(
+                 backend._ffi.buffer(
+                     gn.d.iPAddress.data, gn.d.iPAddress.length
+                 )[:]
+Index: python-cryptography-0.9/src/cryptography/x509.py
+===================================================================
+--- python-cryptography-0.9.orig/src/cryptography/x509.py	2015-06-08 14:51:24.170383246 +0200
++++ python-cryptography-0.9/src/cryptography/x509.py	2015-06-08 14:51:24.166383186 +0200
 @@ -5,7 +5,10 @@
  from __future__ import absolute_import, division, print_function
  
@@ -71,17 +77,68 @@
  from enum import Enum
  
  import six
---- python-cryptography-0.9.orig/tests/test_x509_ext.py
-+++ python-cryptography-0.9/tests/test_x509_ext.py
+Index: python-cryptography-0.9/tests/test_x509_ext.py
+===================================================================
+--- python-cryptography-0.9.orig/tests/test_x509_ext.py	2015-06-08 14:51:24.170383246 +0200
++++ python-cryptography-0.9/tests/test_x509_ext.py	2015-06-08 14:55:28.522013614 +0200
 @@ -5,7 +5,10 @@
  from __future__ import absolute_import, division, print_function
  
  import binascii
 -import ipaddress
 +try:
-+    import ipaddress
++    from ipaddress import IPv4Address, IPv6Address, ip_address
 +except ImportError:
-+    import ipaddr as ipaddress
++    from ipaddr import IPv4Address, IPv6Address, IPAddress as ipaddress
  import os
  
  import pytest
+@@ -1088,20 +1091,20 @@
+             x509.IPAddress(1.3)
+ 
+     def test_repr(self):
+-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
++        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
+         assert repr(gn) == "<IPAddress(value=127.0.0.1)>"
+ 
+-        gn2 = x509.IPAddress(ipaddress.IPv6Address(u"ff::"))
++        gn2 = x509.IPAddress(IPv6Address(u"ff::"))
+         assert repr(gn2) == "<IPAddress(value=ff::)>"
+ 
+     def test_eq(self):
+-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
+-        gn2 = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
++        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
++        gn2 = x509.IPAddress(IPv4Address(u"127.0.0.1"))
+         assert gn == gn2
+ 
+     def test_ne(self):
+-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
+-        gn2 = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.2"))
++        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
++        gn2 = x509.IPAddress(IPv4Address(u"127.0.0.2"))
+         assert gn != gn2
+         assert gn != object()
+ 
+@@ -1251,8 +1254,8 @@
+ 
+         ip = san.get_values_for_type(x509.IPAddress)
+         assert [
+-            ipaddress.ip_address(u"127.0.0.1"),
+-            ipaddress.ip_address(u"ff::")
++            ip_address(u"127.0.0.1"),
++            ip_address(u"ff::")
+         ] == ip
+ 
+     def test_dirname(self, backend):
+@@ -1351,8 +1354,8 @@
+             ])
+         ] == dirname
+         assert [
+-            ipaddress.ip_address(u"127.0.0.1"),
+-            ipaddress.ip_address(u"ff::")
++            ip_address(u"127.0.0.1"),
++            ip_address(u"ff::")
+         ] == ip
+ 
+     def test_invalid_rfc822name(self, backend):




More information about the Python-modules-commits mailing list