summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2022-08-13 12:11:06 -0400
committerGitHub <noreply@github.com>2022-08-13 12:11:06 -0400
commita145fc3bc6d2e943434beb2f04bbf9b18930296f (patch)
treec7474706fcd95937ed67186e5c5e6a3c4390d4b3
parent301e29a8c0c1346086ac92653c88c53d9949a7d1 (diff)
downloadpyopenssl-a145fc3bc6d2e943434beb2f04bbf9b18930296f.tar.gz
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
-rw-r--r--src/OpenSSL/crypto.py6
1 files 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",
)