Skip to content

setuptools 60.0.0 breaking change #325

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

Closed
vpipkt opened this issue Dec 20, 2021 · 6 comments
Closed

setuptools 60.0.0 breaking change #325

vpipkt opened this issue Dec 20, 2021 · 6 comments
Labels
external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@vpipkt
Copy link

vpipkt commented Dec 20, 2021

install_requires should avoid setuptools>=60 as it results in (apparently) a ModuleNotFound error. We encountered this in GitHub actions calls to gcloud tools.

Environment details

  • OS type and version: Ubuntu (Github Actions ubuntu 2004)
  • Python version: 3.7.12
  • pip version: 20.0.2
  • google-api-core 2.3.2
  • setuptools 60.0.0

Steps to reproduce

  1. pip install google-api-core with eager upgrade strategy
  2. make call to gcloud

Code example

$ pip install --upgrade --upgrade-strategy eager  "google-api-python-client>=1.0.0"
$ gcloud container images list-tags
ERROR: gcloud failed to load (gcloud.container.images.list_tags): Problem loading gcloud.container.images.list_tags: No module named 'setuptools._distutils'.

# then try
$ pip install --upgrade --upgrade-strategy eager  "setuptools<60" "google-api-python-client>=1.0.0"
$ gcloud container images list-tags
ERROR: (gcloud.container.images.list-tags) argument IMAGE_NAME: Must be specified.
# This is the expected result .... 

CLI output in failure case

ERROR: gcloud failed to load (gcloud.container.images.list_tags): Problem loading gcloud.container.images.list_tags: No module named 'setuptools._distutils'.

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
    /Users/jason.brown/.virtualenvs/dgx/bin/python3
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.

If you are still experiencing problems, please run the following command to reinstall:
    $ gcloud components reinstall

If that command fails, please reinstall the Cloud SDK using the instructions here:
    https://cloud.google.com/sdk/

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 21, 2021
@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. external This issue is blocked on a bug with the actual product. and removed triage me I really want to be triaged. labels Dec 21, 2021
@parthea
Copy link
Collaborator

parthea commented Dec 21, 2021

Hi @vpipkt,

Thanks for reporting this issue. I've reached out to the gcloud sdk team. I'll update this issue once I hear back. Googlers see b/211562528.

@0-wiz-0
Copy link

0-wiz-0 commented Jan 5, 2022

On the same topic: setup.py has setuptools in its dependencies, but I don't see how it's used in the code (there is no import setuptools). Should this really be there?

@parthea
Copy link
Collaborator

parthea commented Jan 5, 2022

Hi @0-wiz-0 ,

setuptools is used here.

@parthea
Copy link
Collaborator

parthea commented Jan 5, 2022

b/211562528 has been resolved. I'll keep this issue open until a new release is published and docs are updated.

@parthea parthea added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jan 5, 2022
@parthea
Copy link
Collaborator

parthea commented Jan 5, 2022

I'm going to bump this to P2 as there is a workaround.

@parthea
Copy link
Collaborator

parthea commented Jan 12, 2022

A new version of the gcloud SDK 368.0.0 was published yesterday which should fix this issue. Please feel free to re-open this issue if the new version of gcloud SDK doesn't resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants