-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
All google-cloud-* packages broke due to poor dependency management when version 0.21.0 was released.
All google-cloud-* packages depend on google-cloud-core >= <current_version>. Version 0.21.0 was a breaking change, compared to 0.20.0.
As a result, a dependency on a pinned down version is automatically broken as soon as a new version is released.
The workaround is fairly simple. If one depends on google-cloud-*, one must explicitly specify the version of google-cloud-core to depend on.
The real issue lies at dependency management of the google-cloud-* packages. Dependencies should be locked down in the packages that use them. So the requirements should be changed from google-cloud-core >= <current_version> to google-cloud-core ~= <current_version> (assuming semver is used and patch versions are non-breaking).
- OS type and version
Ubuntu 16.0.4 - Python version and virtual environment information
python --version
$ python --version
Python 3.5.1+- google-cloud-python version
pip show google-cloud,pip show google-<service>orpip freeze
$ pip list
Package Version
------------------------ -----------
...
google-cloud-core 0.21.0
google-cloud-datastore 0.20.1
google-cloud-storage 0.20.0
...- Stacktrace if available
File ".tox/docs/lib/python3.5/site-packages/google/cloud/datastore/__init__.py", line 55, in <module>
from google.cloud.datastore.connection import Connection
File ".tox/docs/lib/python3.5/site-packages/google/cloud/datastore/connection.py", line 23, in <module>
from google.cloud import connection as connection_module
ImportError: cannot import name 'connection'
- Steps to reproduce
pip install google-cloud-datastore~=0.20.0