Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit f357187

Browse files
committed
added warning
1 parent 3f88a24 commit f357187

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

google/auth/crypt/_python_rsa.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from __future__ import absolute_import
2323

2424
import io
25+
import warnings
2526

2627
from pyasn1.codec.der import decoder # type: ignore
2728
from pyasn1_modules import pem # type: ignore
@@ -39,6 +40,16 @@
3940
_PKCS8_MARKER = ("-----BEGIN PRIVATE KEY-----", "-----END PRIVATE KEY-----")
4041
_PKCS8_SPEC = PrivateKeyInfo()
4142

43+
warnings.warn(
44+
(
45+
"The 'rsa' library is deprecated and will be removed in a future release. "
46+
"Please migrate to 'cryptography'. To keep using the legacy library, "
47+
"install 'google-auth[rsa]'."
48+
),
49+
category=FutureWarning,
50+
stacklevel=2,
51+
)
52+
4253

4354
def _bit_list_to_bytes(bit_list):
4455
"""Converts an iterable of 1s and 0s to bytes.

0 commit comments

Comments
 (0)