Skip to content

ModuleNotFoundError: No module named 'six' #145

Closed
@brentvollebregt

Description

@brentvollebregt

google-auth 2.0.0 was released a few hours ago which google-auth-oauthlib depends on. The latest version 2.0.0 is now being used because the dependency google-auth>=1.0.0 is specified.

It appears google-auth 2.0.0 drops support for Python 2.7 and with this dropped the dependency of six which exists in 1.35.0 (latest compatible). This library (google-auth-oauthlib) requires six but does not declare it as a dependency - it was relying on a dependency having it as a dependency.

six needs to be added as a dependency to fix this.

Environment details

  • OS type and version: Windows (originally discovered on ubuntu-18.04)
  • Python version: 3.7
  • pip version: 19.2.3
  • google-auth-oauthlib version: 0.4.5

Steps to reproduce

  1. Create a new Python virtual environment
  2. Activate the virtual environment
  3. Install google-auth-oauthlib: pip install google-auth-oauthlib
  4. Execute the code example below

A positive result will not throw any exceptions in step 4 whereas it now does.

To prove it worked previously, extending the steps above:

  1. Install the old google-auth library: pip install google-auth==1.35.0
  2. Execute the code example below

Code example

from google_auth_oauthlib.flow import InstalledAppFlow

Based on the example import from here.

Stack trace

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from google_auth_oauthlib.flow import InstalledAppFlow
  File "C:\Users\Brent\GitHub\my-actions\.venv\lib\site-packages\google_auth_oauthlib\__init__.py", line 21, in <module>
    from .interactive import get_user_credentials
  File "C:\Users\Brent\GitHub\my-actions\.venv\lib\site-packages\google_auth_oauthlib\interactive.py", line 24, in <module>
    import google_auth_oauthlib.flow
  File "C:\Users\Brent\GitHub\my-actions\.venv\lib\site-packages\google_auth_oauthlib\flow.py", line 70, in <module>
    from six.moves import input
ModuleNotFoundError: No module named 'six'

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to 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