From a145fc3bc6d2e943434beb2f04bbf9b18930296f Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sat, 13 Aug 2022 12:11:06 -0400 Subject: Switch to the new utils.deprecation spelling (#1140) * Switch to the new utils.deprecation spelling The new spelling was introduced in https://github.com/pyca/cryptography/pull/6923 and is more friendly to type checkers. Version-wise, that PR appears to be in cryptography 37.0.0, which is now beyond the minimum version for pyOpenSSL. * reformat --- src/OpenSSL/crypto.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 6f034d0..18b4590 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -3221,7 +3221,7 @@ def load_pkcs7_data(type: int, buffer: Union[str, bytes]) -> PKCS7: return pypkcs7 -load_pkcs7_data = utils.deprecated( +utils.deprecated( load_pkcs7_data, __name__, ( @@ -3229,6 +3229,7 @@ load_pkcs7_data = utils.deprecated( "in cryptography." ), DeprecationWarning, + name="load_pkcs7_data", ) @@ -3319,7 +3320,7 @@ def load_pkcs12( return pkcs12 -load_pkcs12 = utils.deprecated( +utils.deprecated( load_pkcs12, __name__, ( @@ -3327,4 +3328,5 @@ load_pkcs12 = utils.deprecated( "in cryptography." ), DeprecationWarning, + name="load_pkcs12", ) -- cgit v1.2.1