GeezerVison is showing github.com — Remove datastore.Dataset class · Issue #477 · googleapis/google-cloud-python
Remove datastore.Dataset class #477DescriptionThe replacement will be handled by a string when dataset ID is explicitly needed (which will only be for power users). Some functionality will be moved to key.Key and the rest to the connection module as free functions. In order to make use easier, they will also have versions in __init__ which can use a default / implicit connection.
Steps to complete:
- Make
set_default_connection similar to set_default_dataset (Address first part of 477: Implements datastore.set_default_connection. #478)
- Remove
query(), entity(), and transaction() methods from Dataset, replace their use elsewhere. (Address second part of 477: Remove query(), entity(), and transaction() methods from Dataset. #479)
- Move
Dataset.get_entity to Key (will impact elsewhere, e.g. Entity.reload) (Address third part of 477: Move Dataset.get_entity to Key. #480)
- Move
save() and delete() methods delete() method from Entity to Key (Address fourth part of 477: Moving Entity.delete to Key (for datastore). #481)
- Move
allocate_ids() method from Dataset to connection __init__ module as free function (Address fifth part of 477: Moves Dataset.allocate_ids to connection module. #482)
- Move
get_entities() method from Dataset to connection __init__ module as free function (Address sixth part of 477: Moves Dataset.get_entities to __init__ module. #483)
- Fix
Remove dataset from Entity constructor and allow a key #484, Remove Query dependency on Dataset and make dataset_id required in Query #485, Remove Transaction dependency on Dataset #486 - Lots to do to re-make Entity, Query, and Transaction to not depend on Dataset
- Remove all remnants of
Dataset (e.g. set_default_dataset, Entity._must_dataset, and _implicit_environ._DatastoreBase)
- Update stale documentation
NOTE: Don't close until cyclic-import in #480 is resolved.
See https://docs.google.com/document/d/1xKw8Tz6lfN5uOcv0my4uUgFSeDoRzwCLho2UGlBpqDU/edit for more. Activityadded 6 commits that reference this issue on Nov 22, 2025This issue will close once commit 0fa5ad8 is merged into the 'main' branch.0fa5ad8 This issue will close once commit 63b2e41 is merged into the 'main' branch.63b2e41 This issue will close once commit 631c334 is merged into the 'main' branch.631c334 This issue will close once commit 2daa23e is merged into the 'main' branch.2daa23e This issue will close once commit 0a19b51 is merged into the 'main' branch.0a19b51 This issue will close once commit a729f9b is merged into the 'main' branch.a729f9b
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|