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
Copy file name to clipboardExpand all lines: docs/04_upgrading/upgrading_to_v2.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,37 @@ id: upgrading-to-v2
3
3
title: Upgrading to v2
4
4
---
5
5
6
-
This page summarizes the breaking changes between Apify Python API client v1.x and v2.0.
6
+
This page summarizes the breaking changes between Apify Python API Client v1.x and v2.0.
7
7
8
8
## Python version support
9
9
10
-
<!-- TODO -->
10
+
Support for Python 3.9 has been dropped. The Apify Python API Client v2.x now requires Python 3.10 or later. Make sure your environment is running a compatible version before upgrading.
11
11
12
-
## Change underlying HTTP library
12
+
## New underlying HTTP library
13
13
14
14
In v2.0, the Apify Python API client switched from using `httpx` to [`impit`](https://github.com/apify/impit) as the underlying HTTP library.
15
15
16
-
## Update signature of methods
16
+
## API method changes
17
17
18
-
<!-- TODO -->
18
+
### Removed parameters and attributes
19
+
20
+
- The `parse_response` parameter has been removed from the `call()` method. This was an internal parameter that added a private attribute to the `Response` object.
21
+
- The private `_maybe_parsed_body` attribute has been removed from the `Response` object.
22
+
23
+
### KeyValueStoreClient
24
+
25
+
- The deprecated parameters `as_bytes` and `as_file` have been removed from `KeyValueStoreClient.get_record()`. Use the dedicated methods `get_record_as_bytes()` and `stream_record()` instead.
26
+
27
+
### DatasetClient
28
+
29
+
- The `unwind` parameter no longer accepts a single string value. Use a list of strings instead: `unwind=['items']` rather than `unwind='items'`.
30
+
31
+
## Module reorganization
32
+
33
+
### Constants
34
+
35
+
- Deprecated constant re-exports from `consts.py` have been removed. Constants should now be imported from the [apify-shared-python](https://github.com/apify/apify-shared-python) package.
36
+
37
+
### Errors
38
+
39
+
- Error classes are now accessible from the public `apify_client.errors` module. See the [API documentation](https://docs.apify.com/api/client/python/reference/class/ApifyApiError) for a complete list of available error classes.
0 commit comments