-
Notifications
You must be signed in to change notification settings - Fork 23
refactor!: remove deprecated APIs #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,3 +9,50 @@ This guide lists the breaking changes between Apify Python SDK v3.x and v4.0. | |||||||||
| ## Python 3.11+ required | ||||||||||
|
|
||||||||||
| 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. | ||||||||||
|
|
||||||||||
| ## Removal of deprecated APIs | ||||||||||
|
|
||||||||||
| Methods and arguments that had been deprecated in v3 are removed in v4. | ||||||||||
|
|
||||||||||
| ### `api_public_base_url` argument of storage clients | ||||||||||
|
|
||||||||||
| The deprecated `api_public_base_url` argument has been removed from `ApifyDatasetClient` and `ApifyKeyValueStoreClient`. It had no effect already in v3 — passing it only emitted a `DeprecationWarning`. Drop it from your call sites. The public base URL is taken from `Configuration.api_public_base_url`, which is unchanged. | ||||||||||
|
|
||||||||||
| Before (v3): | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about combining these two examples into one codeblock and using |
||||||||||
|
|
||||||||||
| ```python | ||||||||||
| client = ApifyDatasetClient( | ||||||||||
| api_client=api_client, | ||||||||||
| api_public_base_url='https://api.apify.com', | ||||||||||
| lock=lock, | ||||||||||
| ) | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| After (v4): | ||||||||||
|
|
||||||||||
| ```python | ||||||||||
| client = ApifyDatasetClient( | ||||||||||
| api_client=api_client, | ||||||||||
| lock=lock, | ||||||||||
| ) | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### `Actor.start` and `Actor.call`: `RemainingTime` | ||||||||||
|
|
||||||||||
| 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. | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
| Before (v3): | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same suggestion as above, how about creating one code block for the examples? |
||||||||||
|
|
||||||||||
| ```python | ||||||||||
| run = await Actor.call('user/actor', timeout='RemainingTime') | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| After (v4): | ||||||||||
|
|
||||||||||
| ```python | ||||||||||
| run = await Actor.call('user/actor', timeout='inherit') | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Deprecated `Configuration` fields | ||||||||||
|
|
||||||||||
| The deprecated `latest_sdk_version`, `log_format`, and `standby_port` fields have been removed from `Configuration`. Use `web_server_port` in place of `standby_port`; the other two have no replacement — SDK version checking is not supported for the Python SDK, and the log format should be adjusted in code instead. | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.