Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup.py: remove rsa requirement #942

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ktdreyer
Copy link

@ktdreyer ktdreyer commented Jan 13, 2022

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.

Fixes: #941

@ktdreyer ktdreyer force-pushed the require-cryptography branch 2 times, most recently from 2c6ceef to d406a4f Compare January 13, 2022 17:16
@ktdreyer ktdreyer changed the title setup.py: require cryptography instead of rsa feat: setup.py: require cryptography instead of rsa Jan 13, 2022
@parthea parthea added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 19, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 19, 2022
@arithmetic1728
Copy link
Contributor

I think simply removing the rsa dependency will break the library since it is still in use: https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/crypt/_python_rsa.py#L28

@ktdreyer
Copy link
Author

Please see #646 , the code does not use python-rsa if python-cryptography is installed.

@ktdreyer
Copy link
Author

This is still relevant because pip install google-auth still pulls in the old rsa library.

As I look at rebasing this today, I can remove the entry from setup.py, but it's now present in .kokoro/requirements.txt too. How do I make the change to that file?

Copy link

conventional-commit-lint-gcf bot commented Feb 21, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

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.
@ktdreyer ktdreyer changed the title feat: setup.py: require cryptography instead of rsa feat: setup.py: remove rsa requirement Feb 21, 2024
@ktdreyer
Copy link
Author

I researched kokoro to understand how to remove rsa from .kokoro/requirements.txt.

google-auth requires rsa, so we need to remove rsa from setup.py, then push a new release:

google-auth
  └rsa

The complicating factor is that .kokoro/requirements.in lists two modules that are not in setup.py: (gcp-docuploader and gcp-releasetool). These entries cause pip-compile to fetch google-auth=2.28.0 from PyPI. Because 2.28.0 still requires rsa, pip-compile still puts rsa into requirements.txt.

I think the solution here is to release a new google-auth version with this PR, then re-run pip-compile, and we should see the entry disappear from .kokoro/requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

require cryptography in packaging metadata (and remove rsa)
4 participants