@@ -205,7 +205,7 @@ def get_entities(keys, missing=None, deferred=None,
205205 return entities
206206
207207
208- def allocate_ids (incomplete_key , num_ids , connection = None , dataset_id = None ):
208+ def allocate_ids (incomplete_key , num_ids , connection = None ):
209209 """Allocates a list of IDs from a partial key.
210210
211211 :type incomplete_key: A :class:`gcloud.datastore.key.Key`
@@ -217,23 +217,20 @@ def allocate_ids(incomplete_key, num_ids, connection=None, dataset_id=None):
217217 :type connection: :class:`gcloud.datastore.connection.Connection`
218218 :param connection: Optional. The connection used to connect to datastore.
219219
220- :type dataset_id: string
221- :param dataset_id: Optional. The ID of the dataset.
222-
223220 :rtype: list of :class:`gcloud.datastore.key.Key`
224221 :returns: The (complete) keys allocated with ``incomplete_key`` as root.
225222 :raises: :class:`ValueError` if ``incomplete_key`` is not a partial key.
226223 """
227224 connection = _require_connection (connection )
228- dataset_id = _require_dataset_id (dataset_id )
229225
230226 if not incomplete_key .is_partial :
231227 raise ValueError (('Key is not partial.' , incomplete_key ))
232228
233229 incomplete_key_pb = incomplete_key .to_protobuf ()
234230 incomplete_key_pbs = [incomplete_key_pb ] * num_ids
235231
236- allocated_key_pbs = connection .allocate_ids (dataset_id , incomplete_key_pbs )
232+ allocated_key_pbs = connection .allocate_ids (incomplete_key .dataset_id ,
233+ incomplete_key_pbs )
237234 allocated_ids = [allocated_key_pb .path_element [- 1 ].id
238235 for allocated_key_pb in allocated_key_pbs ]
239236 return [incomplete_key .completed_key (allocated_id )
0 commit comments