Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Disentangle import cycles #260

@tseaver

Description

@tseaver

Some local non-testing imports are explicitly marked as related to cycles:

$ git grep -n circular
gcloud/datastore/dataset.py:125:        # This import is here to avoid circular 
gcloud/datastore/entity.py:157:        # This is here to avoid circular imports.

Others are not so marked:

gcloud/datastore/__init__.py:64:    from gcloud import credentials
gcloud/datastore/__init__.py:65:    from gcloud.datastore.connection import Connection
gcloud/datastore/dataset.py:73:        from gcloud.datastore.query import Query
gcloud/datastore/dataset.py:86:        from gcloud.datastore.entity import Entity
gcloud/datastore/dataset.py:99:        from gcloud.datastore.transaction import Transaction

gcloud/storage/__init__.py:65:    from gcloud import credentials
gcloud/storage/__init__.py:66:    from gcloud.storage.connection import Connection
gcloud/storage/iterator.py:158:        from gcloud.storage.bucket import Bucket
gcloud/storage/iterator.py:186:        from gcloud.storage.key import Key

We should refactor to fix the cycles, allowing us to normalize those imports.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions