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

Core "grpc" extra not found by setuptools #4186

Closed
markcwhitfield opened this issue Oct 13, 2017 · 9 comments
Closed

Core "grpc" extra not found by setuptools #4186

markcwhitfield opened this issue Oct 13, 2017 · 9 comments
Assignees
Labels
api: core api: pubsub Issues related to the Pub/Sub API. packaging priority: p0 Highest priority. Critical issue. P0 implies highest priority. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@markcwhitfield
Copy link

markcwhitfield commented Oct 13, 2017

google-cloud-pubsub==0.28.4 requires google-cloud-core[grpc] > 0.27.1, <0.28dev. I can see from the core library's setuptools build that the grpc extra is declared; however, setuptools does not seem to be able to locate it from the published PyPi package for whatever reason:

$ docker run python:3 bash -c "pip install google-cloud-core[grpc]"  # python:2 no different
Collecting google-cloud-core[grpc]
  Downloading google_cloud_core-0.27.1-py2.py3-none-any.whl (50kB)
  google-cloud-core 0.27.1 does not provide the extra 'grpc'
...
Successfully installed cachetools-2.0.1 certifi-2017.7.27.1 chardet-3.0.4 google-auth-1.1.1 google-cloud-core-0.27.1 googleapis-common-protos-1.5.3 idna-2.6 protobuf-3.4.0 pyasn1-0.3.7 pyasn1-modules-0.1.5 requests-2.18.4 rsa-3.4.2 six-1.11.0 urllib3-1.22

When installing via pip this is not really an issue, so long as grpcio is included somewhere in the dependency tree, as pip will happily ignore it. Setuptools itself will not, however, and including google-cloud-pubsub==0.28.4 as a requirement in a setuptools build is currently impossible, so far as I can tell.

@dhermes
Copy link
Contributor

dhermes commented Oct 13, 2017

@markcwhitfield Sorry about that! The issue is that we haven't released the updated google-cloud-core that requires that yet!

Thanks a ton for reporting!

@dhermes dhermes added api: pubsub Issues related to the Pub/Sub API. api: core packaging priority: p0 Highest priority. Critical issue. P0 implies highest priority. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 13, 2017
@markcwhitfield
Copy link
Author

Oh, haha. Hadn't even noticed that 0.28.4 was only 3 hours old. Just poor timing on my part, I suppose.

@dhermes
Copy link
Contributor

dhermes commented Oct 13, 2017

And poor something else on our part!

@theacodes
Copy link
Contributor

i'd prefer we hold off on releasing core (it's a big release) and just release a patch of pubsub that fixes this.

@dhermes
Copy link
Contributor

dhermes commented Oct 13, 2017

SGTM. @lukesneeringer SGTY?

@dhermes
Copy link
Contributor

dhermes commented Oct 13, 2017

Can I propose we add .devN suffixes to all version numbers? This way we can accurately reflect, e.g. that google-cloud-pubsub depends on google-cloud-core >= 0.28.0.dev1.

Ref: https://snarky.ca/how-i-manage-package-version-numbers/

@lukesneeringer
Copy link
Contributor

Oh wow, fail on me for not seeing a p0 ticket.
Yes, releasing an update to pubsub to solve the immediate problem is fine.

@noamt
Copy link

noamt commented Oct 19, 2017

So how can we actually resolve this in the meantime?
My setup.py declares google-cloud-storage==1.5.0 and google-cloud-pubsub==0.28.4 but it failes with

Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    install_requires=['google-cloud-storage==1.5.0', 'google-cloud-pubsub==0.28.4', 'backoff==1.4.3'],
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Library/Python/2.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/Library/Python/2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.run()
  File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 411, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 653, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 745, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 875, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2683, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: google-cloud-core 0.27.1 has no such extra feature 'grpc'```

@dhermes
Copy link
Contributor

dhermes commented Nov 3, 2017

Sorry for not following up but this has been resolved by the latest set of releases (mentioned in https://github.com/GoogleCloudPlatform/google-cloud-python/releases/tag/0.28.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core api: pubsub Issues related to the Pub/Sub API. packaging priority: p0 Highest priority. Critical issue. P0 implies highest priority. 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

5 participants