From f27b5125ec9b2b1af211d39ea4123fc2f29b79f3 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Thu, 9 Oct 2025 13:18:47 -0400 Subject: [PATCH] feat: setup.py: remove rsa requirement The rsa library is slower and not as well-maintained as the cryptography library. Now that we require the cryptography library, drop the hard requirement on the rsa library. --- docs/conf.py | 2 +- google/auth/crypt/_cryptography_rsa.py | 2 +- setup.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8ab609390..6aa39716b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -372,4 +372,4 @@ # Autodoc config autoclass_content = "both" autodoc_member_order = "bysource" -autodoc_mock_imports = ["grpc"] +autodoc_mock_imports = ["grpc", "rsa"] diff --git a/google/auth/crypt/_cryptography_rsa.py b/google/auth/crypt/_cryptography_rsa.py index 1a3e9ff52..d6aaf97cd 100644 --- a/google/auth/crypt/_cryptography_rsa.py +++ b/google/auth/crypt/_cryptography_rsa.py @@ -14,7 +14,7 @@ """RSA verifier and signer that use the ``cryptography`` library. -This is a much faster implementation than the default (in +This is a much faster implementation than the alternative (in ``google.auth.crypt._python_rsa``), which depends on the pure-Python ``rsa`` library. """ diff --git a/setup.py b/setup.py index 20f79ce66..071188426 100644 --- a/setup.py +++ b/setup.py @@ -22,9 +22,6 @@ DEPENDENCIES = ( "cachetools>=2.0.0,<7.0", "pyasn1-modules>=0.2.1", - # rsa==4.5 is the last version to support 2.7 - # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233 - "rsa>=3.1.4,<5", ) # TODO(https://github.com/googleapis/google-auth-library-python/issues/1737): Unit test fails with