Skip to content

Commit a145fc3

Browse files
authored
Switch to the new utils.deprecation spelling (#1140)
* Switch to the new utils.deprecation spelling The new spelling was introduced in pyca/cryptography#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
1 parent 301e29a commit a145fc3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/OpenSSL/crypto.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,14 +3221,15 @@ def load_pkcs7_data(type: int, buffer: Union[str, bytes]) -> PKCS7:
32213221
return pypkcs7
32223222

32233223

3224-
load_pkcs7_data = utils.deprecated(
3224+
utils.deprecated(
32253225
load_pkcs7_data,
32263226
__name__,
32273227
(
32283228
"PKCS#7 support in pyOpenSSL is deprecated. You should use the APIs "
32293229
"in cryptography."
32303230
),
32313231
DeprecationWarning,
3232+
name="load_pkcs7_data",
32323233
)
32333234

32343235

@@ -3319,12 +3320,13 @@ def load_pkcs12(
33193320
return pkcs12
33203321

33213322

3322-
load_pkcs12 = utils.deprecated(
3323+
utils.deprecated(
33233324
load_pkcs12,
33243325
__name__,
33253326
(
33263327
"PKCS#12 support in pyOpenSSL is deprecated. You should use the APIs "
33273328
"in cryptography."
33283329
),
33293330
DeprecationWarning,
3331+
name="load_pkcs12",
33303332
)

0 commit comments

Comments
 (0)