8000 All google-cloud-* packages broke due to poor dependency management · Issue #2742 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content
All google-cloud-* packages broke due to poor dependency management #2742
@remcohaszing

Description

@remcohaszing

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).

  1. OS type and version
    Ubuntu 16.0.4
  2. Python version and virtual environment information python --version
$ python --version
Python 3.5.1+
  1. google-cloud-python version pip show google-cloud, pip show google-<service> or pip freeze
$ pip list
Package                  Version    
------------------------ -----------
...
google-cloud-core        0.21.0     
google-cloud-datastore   0.20.1     
google-cloud-storage     0.20.0
...
  1. 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'
  1. Steps to reproduce
pip install google-cloud-datastore~=0.20.0

Metadata

Metadata

Assignees

Labels

packagingtype: 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

    0