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

Python 3.4 not working with rsa version upgrade #548

@aabmass

Description

@aabmass

Environment details

  • OS: Linux
  • Python version: 3.4
  • pip version: 19.1.1
  • google-auth version: 1.18.0

Steps to reproduce

python3.4 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install google-auth

# importing google auth causes the issue
python -c "import google.auth.crypt"
Traceback (most recent call last):
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/google/auth/crypt/rsa.py", line 20, in <module>
    from google.auth.crypt import _cryptography_rsa
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/google/auth/crypt/_cryptography_rsa.py", line 22, in <module>
    import cryptography.exceptions
ImportError: No module named 'cryptography'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/google/auth/crypt/__init__.py", line 43, in <module>
    from google.auth.crypt import rsa
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/google/auth/crypt/rsa.py", line 27, in <module>
    from google.auth.crypt import _python_rsa
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/google/auth/crypt/_python_rsa.py", line 28, in <module>
    import rsa
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/rsa/__init__.py", line 24, in <module>
    from rsa.key import newkeys, PrivateKey, PublicKey
  File "/usr/local/google/home/aaronabbott/tmp/venv3.4/lib/python3.4/site-packages/rsa/key.py", line 35, in <module>
    import typing
ImportError: No module named 'typing'

rsa 4.1 drops python 2 and 3.4 support. The new version that google-auth is using tries to import typing.

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions