Skip to content

Commit d0489f4

Browse files
committed
docs: Align keyword-only upgrade section with client v3 guide wording
1 parent 1f838f4 commit d0489f4

1 file changed

Lines changed: 9 additions & 19 deletions

File tree

docs/04_upgrading/upgrading_to_v4.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,23 @@ This guide lists the breaking changes between Apify Python SDK v3.x and v4.0.
1010

1111
Support for Python 3.10 has been dropped. The Apify Python SDK v4.x now requires Python 3.11 or later — make sure your environment is on a compatible version before upgrading.
1212

13-
## Keyword-only arguments for secondary parameters
13+
## Keyword-only arguments
1414

15-
Several `Actor` methods had a `*` separator inserted into their signatures, so optional/secondary parameters can no longer be passed positionally. The "subject" arguments (e.g. `key` on `get_value`, `data` on `push_data`, `event_name` on `charge`) remain positional; only the parameters that follow them are affected.
16-
17-
### Affected APIs
18-
19-
- `Actor.get_value(key, *, default_value=None)`
20-
- `Actor.push_data(data, *, charged_event_name=None)`
21-
- `Actor.charge(event_name, *, count=1)`
22-
- `Actor.use_state(default_value=None, *, key=None, kvs_name=None)`
23-
24-
The same treatment was applied to the `ChargingManager.charge(event_name, *, count=1)` method returned by `Actor.get_charging_manager()`.
25-
26-
### Migration
27-
28-
Before (v3):
15+
Secondary parameters on these methods can no longer be passed positionally.
2916

3017
```python
18+
# Before
3119
value = await Actor.get_value('my-key', default_value)
3220
await Actor.push_data(data, 'my-event')
3321
await Actor.charge('my-event', 5)
34-
```
35-
36-
After (v4):
3722

38-
```python
23+
# After
3924
value = await Actor.get_value('my-key', default_value=default_value)
4025
await Actor.push_data(data, charged_event_name='my-event')
4126
await Actor.charge('my-event', count=5)
4227
```
28+
29+
Affected signatures:
30+
31+
- `Actor``get_value`, `push_data`, `charge`, `use_state`.
32+
- `ChargingManager``charge`.

0 commit comments

Comments
 (0)