components/python/cryptography/patches/01-deprecation-fix.patch
author Ronald Jordan <ron.jordan@oracle.com>
Tue, 11 Oct 2016 11:55:12 -0700
branchs11u3-sru
changeset 7085 cad8ee01213d
permissions -rw-r--r--
23206271 Upgrade cffi to 1.5.2 22871503 Upgrade cryptography to version 1.2.3 22520335 Integrate idna into Userland 22520346 Integrate ipaddress into Userland

Upstream patch that addresses

	https://github.com/pyca/cryptography/issues/2710

which is already fixed in cryptography 1.3 and above.

commit 0639db99c916e61ac8ee2687c4a9d37c7c67ba76
Author: Alex Gaynor <[email protected]>
Date:   Sat Feb 6 13:39:16 2016 -0500

    Fixes #2710 -- silence a deprecation warning.
    
    Use the new name and alias to the old one

diff --git a/src/cryptography/x509/__init__.py b/src/cryptography/x509/__init__.py
index a1deb7f..787f1a6 100644
--- a/src/cryptography/x509/__init__.py
+++ b/src/cryptography/x509/__init__.py
@@ -4,6 +4,7 @@
 
 from __future__ import absolute_import, division, print_function
 
+from cryptography import utils
 from cryptography.x509.base import (
     Certificate, CertificateBuilder, CertificateRevocationList,
     CertificateRevocationListBuilder,
@@ -30,12 +31,19 @@ from cryptography.x509.general_name import (
 )
 from cryptography.x509.name import Name, NameAttribute
 from cryptography.x509.oid import (
-    AuthorityInformationAccessOID, CRLEntryExtensionOID, CRLExtensionOID,
+    AuthorityInformationAccessOID, CRLEntryExtensionOID,
     CertificatePoliciesOID, ExtendedKeyUsageOID, ExtensionOID, NameOID,
     ObjectIdentifier, SignatureAlgorithmOID, _SIG_OIDS_TO_HASH
 )
 
 
+CRLExtensionOID = utils.deprecated(
+    CRLEntryExtensionOID,
+    __name__,
+    "CRLExtensionOID has been renamed to CRLEntryExtensionOID",
+    utils.DeprecatedIn12
+)
+
 OID_AUTHORITY_INFORMATION_ACCESS = ExtensionOID.AUTHORITY_INFORMATION_ACCESS
 OID_AUTHORITY_KEY_IDENTIFIER = ExtensionOID.AUTHORITY_KEY_IDENTIFIER
 OID_BASIC_CONSTRAINTS = ExtensionOID.BASIC_CONSTRAINTS