Skip to content

Commit 47f84eb

Browse files
Pijukatelvdusek
andauthored
Apply suggestions from code review
Co-authored-by: Vlada Dusek <[email protected]>
1 parent 85bf04d commit 47f84eb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/04_upgrading/upgrading_to_v3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Support for Python 3.9 has been dropped. The Apify Python SDK v3.x now requires
1212
## Actor initialization and ServiceLocator changes
1313

1414
`Actor` initialization and global `service_locator` services setup is more strict and predictable.
15-
- Services in `Actor` can't be changed after calling `Actor.init`, entering the `async with Actor` context manager or after requesting them from the `Actor`
16-
- Services in `Actor` can be different from services in Crawler
15+
- Services in `Actor` can't be changed after calling `Actor.init`, entering the `async with Actor` context manager or after requesting them from the `Actor`.
16+
- Services in `Actor` can be different from services in Crawler.
1717

1818

1919
**Now (v3.0):**

src/apify/storage_clients/_apify/_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ class Alias:
3434
_alias_init_lock: Lock | None = None
3535
"""Lock for creating alias storages. Only one alias storage can be created at the time. Global for all instances."""
3636

37-
ALIAS_STORAGE_KEY_SEPARATOR = ','
38-
ALIAS_MAPPING_KEY = '__STORAGE_ALIASES_MAPPING'
37+
_ALIAS_STORAGE_KEY_SEPARATOR = ','
38+
_ALIAS_MAPPING_KEY = '__STORAGE_ALIASES_MAPPING'
3939

4040
def __init__(
4141
self, storage_type: type[Dataset | KeyValueStore | RequestQueue], alias: str, configuration: Configuration
4242
) -> None:
43-
self.storage_type = storage_type
44-
self.alias = alias
45-
self.additional_cache_key = self.get_additional_cache_key(configuration)
43+
self._storage_type = storage_type
44+
self._alias = alias
45+
self._additional_cache_key = self.get_additional_cache_key(configuration)
4646

4747
async def __aenter__(self) -> Alias:
4848
"""Context manager to prevent race condition in alias creation."""
@@ -155,7 +155,7 @@ async def store_mapping(self, storage_id: str) -> None:
155155
logger.warning(f'Error storing alias mapping for {self.alias}: {exc}')
156156

157157

158-
async def get_default_kvs_client() -> KeyValueStoreClientAsync:
158+
async def _get_default_kvs_client() -> KeyValueStoreClientAsync:
159159
"""Get a client for the default key-value store."""
160160
configuration = Configuration.get_global_configuration()
161161

0 commit comments

Comments
 (0)