Skip to content

fix: deprecate exit_code and status_message in the Actor constructor - #1194

Closed
cobanfurkanx wants to merge 1 commit into
apify:masterfrom
cobanfurkanx:fix/deprecate-actor-constructor-exit-args
Closed

cobanfurkanx wants to merge 1 commit into
apify:masterfrom
cobanfurkanx:fix/deprecate-actor-constructor-exit-args

Conversation

@cobanfurkanx

Copy link
Copy Markdown

Passing exit_code or status_message to Actor(...) now emits a DeprecationWarning (scheduled for removal in 5.0.0) recommending Actor.exit() / Actor.fail() or setting Actor.exit_code / Actor.status_message inside the context manager.

Default values in _ActorType.__init__ and _ActorType.__call__ are changed to None so an explicit Actor(exit_code=0) also triggers the warning while bare Actor() continues to default _exit_code to 0 without warning.

Closes: #1186

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 17, 2026
@vdusek

vdusek commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

This is for v5, which we'll start working on in late 2027. Closing.

@vdusek vdusek closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove exit_code and status_message from the Actor constructor

3 participants