Skip to content

Commit 15374ff

Browse files
committed
Update upgrading guide
1 parent c79a3f3 commit 15374ff

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/04_upgrading/upgrading_to_v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def main():
5050
- `Configuration.default_dataset_id` changed from `'default'` to `None`.
5151
- `Configuration.default_request_queue_id` changed from `'default'` to `None`.
5252

53-
As a consequence of this change, using default storage without specifying its `id` in `Configuration` will use unnamed storage.
53+
Previously using the default storage without specifying its `id` in `Configuration` would lead to using specific storage with id `'default'`. Now it will use newly created unnamed storage with `'id'` assigned by the Apify platform, consecutive calls to get the default storage will return the same storage.
5454

5555
## Storages
5656

tests/integration/test_apify_storages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ async def test_unnamed_default_without_config(
4545
service_locator.set_configuration(Configuration(token=apify_token))
4646
service_locator.set_storage_client(ApifyStorageClient())
4747

48+
# Open storage and make sure it has no name and it has id
4849
storage = await storage_type.open()
4950
assert storage.name is None
5051
assert storage.id
52+
53+
# Make sure the same instance is returned when opened again without name or alias
54+
storage_again = await storage_type.open()
55+
assert storage is storage_again
56+
5157
await storage.drop()

0 commit comments

Comments
 (0)