Repository navigation
fix: deprecate max_items in favor of max_total_charge_usd - #1168
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1168 +/- ##
==========================================
+ Coverage 92.82% 92.84% +0.02%
==========================================
Files 53 53
Lines 3554 3566 +12
==========================================
+ Hits 3299 3311 +12
Misses 255 255
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
barjin
approved these changes
Oct 9, 2026
…' into deprecate-max-items # Conflicts: # src/apify/_actor.py
# Conflicts: # src/apify/_actor.py # tests/unit/actor/test_actor_helpers.py
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.
max_itemsis a leftover from the pay-per-result pricing model. The platform applies it to pay-per-event Actors only whenmax_total_charge_usdis not set, by turning it into a charge limit priced by the Actor'sapify-default-dataset-itemevent or its last pay-per-result price. On any other Actor it does nothing, and the name doesn't suggest that.max_itemsdocstrings onActor.start,Actor.call,Actor.start_task,Actor.call_taskandActor.resurrectmark it deprecated (removal in 5.0.0) and describe what it really does.max_itemsemits aFutureWarningthat recommendsmax_total_charge_usd. I pickedFutureWarningoverDeprecationWarningbecause Python hidesDeprecationWarningunless the caller is__main__, so it would never show up in an Actor's run log.Stacked on #1167, which adds
max_total_charge_usdto the task methods. Raised in #1166 (comment); the JS counterpart is apify/apify-sdk-js#768.✍️ Drafted by Claude Code