Skip to content

Commit dcf16a9

Browse files
committed
Revert "chore: add warning for rsa library (#1925)"
This reverts commit 59b6abc.
1 parent bb5190b commit dcf16a9

3 files changed

Lines changed: 0 additions & 28 deletions

File tree

packages/google-auth/google/auth/crypt/_python_rsa.py

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

2424
import io
25-
import warnings
2625

2726
from pyasn1.codec.der import decoder # type: ignore
2827
from pyasn1_modules import pem # type: ignore
@@ -40,15 +39,6 @@
4039
_PKCS8_MARKER = ("-----BEGIN PRIVATE KEY-----", "-----END PRIVATE KEY-----")
4140
_PKCS8_SPEC = PrivateKeyInfo()
4241

43-
warnings.warn(
44-
(
45-
"The 'rsa' library is deprecated and will be removed in a future release. "
46-
"Please migrate to 'cryptography'."
47-
),
48-
category=DeprecationWarning,
49-
stacklevel=2,
50-
)
51-
5242

5343
def _bit_list_to_bytes(bit_list):
5444
"""Converts an iterable of 1s and 0s to bytes.
@@ -74,10 +64,6 @@ def _bit_list_to_bytes(bit_list):
7464
class RSAVerifier(base.Verifier):
7565
"""Verifies RSA cryptographic signatures using public keys.
7666
77-
.. deprecated::
78-
The `rsa` library has been archived. Please migrate to
79-
`cryptography`.
80-
8167
Args:
8268
public_key (rsa.key.PublicKey): The public key used to verify
8369
signatures.
@@ -130,10 +116,6 @@ def from_string(cls, public_key):
130116
class RSASigner(base.Signer, base.FromServiceAccountMixin):
131117
"""Signs messages with an RSA private key.
132118
133-
.. deprecated::
134-
The `rsa` library has been archived. Please migrate to
135-
`cryptography`.
136-
137119
Args:
138120
private_key (rsa.key.PrivateKey): The private key to sign with.
139121
key_id (str): Optional key ID used to identify this private key. This

packages/google-auth/noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def unit(session):
135135
"--cov-report=term-missing",
136136
"tests",
137137
"tests_async",
138-
*session.posargs,
139138
)
140139

141140

packages/google-auth/tests/crypt/test__python_rsa.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,3 @@ def test_from_service_account_file(self):
191191

192192
assert signer.key_id == SERVICE_ACCOUNT_INFO[base._JSON_FILE_PRIVATE_KEY_ID]
193193
assert isinstance(signer._key, rsa.key.PrivateKey)
194-
195-
196-
class TestModule(object):
197-
def test_import_warning(self):
198-
import importlib
199-
from google.auth.crypt import _python_rsa
200-
201-
with pytest.warns(DeprecationWarning, match="The 'rsa' library is deprecated"):
202-
importlib.reload(_python_rsa)

0 commit comments

Comments
 (0)