Repository navigation
feat: add max_total_charge_usd to Actor.start_task and Actor.call_task - #1167
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1167 +/- ##
=======================================
Coverage 92.88% 92.88%
=======================================
Files 53 53
Lines 3554 3554
=======================================
Hits 3301 3301
Misses 253 253
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
added this pull request to stack #1169
October 8, 2026 13:35
vdusek
marked this pull request as ready for review
October 8, 2026 13:38
max_total_charge_usd to Actor.start_task and Actor.call_task
vdusek
added a commit
that referenced
this pull request
Oct 9, 2026
`max_items` is a leftover from the pay-per-result pricing model. The platform applies it to pay-per-event Actors only when `max_total_charge_usd` is not set, by turning it into a charge limit priced by the Actor's `apify-default-dataset-item` event or its last pay-per-result price. On any other Actor it does nothing, and the name doesn't suggest that. - The `max_items` docstrings on `Actor.start`, `Actor.call`, `Actor.start_task`, `Actor.call_task` and `Actor.resurrect` mark it deprecated (removal in 5.0.0) and describe what it really does. - Passing `max_items` emits a `FutureWarning` that recommends `max_total_charge_usd`. I picked `FutureWarning` over `DeprecationWarning` because Python hides `DeprecationWarning` unless the caller is `__main__`, so it would never show up in an Actor's run log. Stacked on #1167, which adds `max_total_charge_usd` to the task methods. Raised in #1166 (comment); the JS counterpart is apify/apify-sdk-js#768. *✍️ Drafted by Claude Code*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the SDK to apify-client 3.3.0 and picks up its new task option.
Actor.start_taskandActor.call_tasktakemax_total_charge_usd, the cost capActor.startandActor.callalready have. feat: add max_total_charge_usd to task start() and call() apify-client-python#1097 added it to the task client in 3.3.0.pyproject.toml: lower bound>=3.1.0->>=3.3.0.HeadRequest->RequestQueueHeadItemLockedHeadRequest->LockedRequestQueueHeadItemRequest->RequestResourceRequestDraft->UnprocessedRequest✍️ Drafted by Claude Code