Skip to content

Commit 1cec1ea

Browse files
Mantisusvdusek
andauthored
docs: Update "Upgrading to v2" guide (#472)
- Update "Upgrading to v2" guide --------- Co-authored-by: Vlada Dusek <[email protected]>
1 parent 99acc0b commit 1cec1ea

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

docs/04_upgrading/upgrading_to_v2.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,41 @@ id: upgrading-to-v2
33
title: Upgrading to v2
44
---
55

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.
77

88
## Python version support
99

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.
1111

12-
## Change underlying HTTP library
12+
## New underlying HTTP library
1313

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.
14+
In v2.0, the Apify Python API client switched from using [`httpx`](https://www.python-httpx.org/) to [`impit`](https://github.com/apify/impit) as the underlying HTTP library. However, this change shouldn't have much impact on the end user.
1515

16-
## Update signature of methods
16+
## API method changes
1717

18-
<!-- TODO -->
18+
Several public methods have changed their signatures or behavior.
19+
20+
### Removed parameters and attributes
21+
22+
- The `parse_response` parameter has been removed from the `HTTPClient.call()` method. This was an internal parameter that added a private attribute to the `Response` object.
23+
- The private `_maybe_parsed_body` attribute has been removed from the `Response` object.
24+
25+
### KeyValueStoreClient
26+
27+
- 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.
28+
29+
### DatasetClient
30+
31+
- The `unwind` parameter no longer accepts a single string value. Use a list of strings instead: `unwind=['items']` rather than `unwind='items'`.
32+
33+
## Module reorganization
34+
35+
Some modules have been restructured.
36+
37+
### Constants
38+
39+
- 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 if needed.
40+
41+
### Errors
42+
43+
- 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

Comments
 (0)