You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes deprecated APIs as part of the v4 major release.
### `api_public_base_url` argument of storage clients (closes#635)
Removed the deprecated `api_public_base_url` `__init__` argument from
`ApifyDatasetClient` and `ApifyKeyValueStoreClient` (and the `open()`
call sites that passed `''`). It had no effect already in v3 — passing
it only emitted a `DeprecationWarning`. The public base URL is taken
from `Configuration.api_public_base_url`, which is unchanged.
### `RemainingTime` timeout literal
Removed the deprecated `'RemainingTime'` value of the `timeout` argument
from `Actor.start()` and `Actor.call()`. Use `'inherit'` instead — the
behavior is identical.
### Deprecated `Configuration` fields
Removed the `@deprecated` config fields `latest_sdk_version`,
`log_format`, and `standby_port` (use `web_server_port` instead).
Also drops the now-unused `warnings`/`deprecated` imports and the
obsolete deprecation-warning unit tests, and documents all removals in
the v4 upgrade guide.
Mirrors apify/apify-client-python#799 for this repository.
Copy file name to clipboardExpand all lines: docs/04_upgrading/upgrading_to_v4.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,3 +9,44 @@ This guide lists the breaking changes between Apify Python SDK v3.x and v4.0.
9
9
## Python 3.11+ required
10
10
11
11
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.
12
+
13
+
## Removal of deprecated APIs
14
+
15
+
Methods and arguments that had been deprecated in v3 are removed in v4.
16
+
17
+
### api_public_base_url argument of storage clients
18
+
19
+
The deprecated `api_public_base_url` argument has been removed from `ApifyDatasetClient` and `ApifyKeyValueStoreClient`. It had no effect already in v3, passing it emitted only a `DeprecationWarning`. Drop it from your call sites. The public base URL is taken from `Configuration.api_public_base_url`, which is unchanged.
20
+
21
+
```python
22
+
# Before (v3)
23
+
client = ApifyDatasetClient(
24
+
api_client=api_client,
25
+
api_public_base_url='https://api.apify.com',
26
+
lock=lock,
27
+
)
28
+
29
+
# After (v4)
30
+
client = ApifyDatasetClient(
31
+
api_client=api_client,
32
+
lock=lock,
33
+
)
34
+
```
35
+
36
+
### Actor.start and Actor.call: RemainingTime
37
+
38
+
The deprecated `RemainingTime` value of the `timeout` argument has been removed from `Actor.start()` and `Actor.call()`. Use `inherit` instead, the signature and behavior are identical.
39
+
40
+
```python
41
+
# Before (v3)
42
+
run =await Actor.call('user/actor', timeout='RemainingTime')
43
+
44
+
# After (v4)
45
+
run =await Actor.call('user/actor', timeout='inherit')
46
+
```
47
+
48
+
### Deprecated Configuration fields
49
+
50
+
The deprecated `latest_sdk_version`, `log_format`, and `standby_port` fields have been removed from `Configuration`:
51
+
- In place of `standby_port`, use `web_server_port`.
52
+
-`latest_sdk_version` and `log_format` don't have replacement. SDK version checking isn't supported for the Python SDK and the log format should be adjusted in code instead.
0 commit comments