refactor!: remove deprecated APIs#918
Conversation
Removes deprecated APIs as part of the v4 major release: - `api_public_base_url` argument of `ApifyDatasetClient.__init__` and `ApifyKeyValueStoreClient.__init__` (closes #635). It had no effect already and only emitted a `DeprecationWarning`. The public base URL is taken from `Configuration.api_public_base_url`, which is unchanged. - `RemainingTime` value of the `timeout` argument of `Actor.start()` and `Actor.call()` — replaced by `inherit`. - Deprecated `Configuration` fields `latest_sdk_version`, `log_format`, and `standby_port` (use `web_server_port` instead). Also drops the now-unused `warnings` and `deprecated` imports and the associated unit tests for the removed deprecation warnings.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #918 +/- ##
==========================================
- Coverage 87.00% 86.87% -0.13%
==========================================
Files 48 48
Lines 2956 2942 -14
==========================================
- Hits 2572 2556 -16
- Misses 384 386 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| ### `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. |
There was a problem hiding this comment.
| 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. | |
| 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. |
|
|
||
| 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): |
There was a problem hiding this comment.
How about combining these two examples into one codeblock and using Before (v3) and After (v4) as comments, so that it stays consistent with the Keyword-only arguments section in this PR?
|
|
||
| ### `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. |
There was a problem hiding this comment.
| 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. | |
| 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. |
|
|
||
| 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. | ||
|
|
||
| Before (v3): |
There was a problem hiding this comment.
Same suggestion as above, how about creating one code block for the examples?
|
|
||
| ### 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. |
There was a problem hiding this comment.
| 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. | |
| The deprecated `latest_sdk_version`, `log_format`, and `standby_port` fields have been removed from `Configuration`: | |
| - In place of `standby_port`, use `web_server_port`. | |
| - `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. |
Removes deprecated APIs as part of the v4 major release.
api_public_base_urlargument of storage clients (closes #635)Removed the deprecated
api_public_base_url__init__argument fromApifyDatasetClientandApifyKeyValueStoreClient(and theopen()call sites that passed''). It had no effect already in v3 — passing it only emitted aDeprecationWarning. The public base URL is taken fromConfiguration.api_public_base_url, which is unchanged.RemainingTimetimeout literalRemoved the deprecated
'RemainingTime'value of thetimeoutargument fromActor.start()andActor.call(). Use'inherit'instead — the behavior is identical.Deprecated
ConfigurationfieldsRemoved the
@deprecatedconfig fieldslatest_sdk_version,log_format, andstandby_port(useweb_server_portinstead).Also drops the now-unused
warnings/deprecatedimports 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.