Skip to content

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

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

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

This branch has not been deployed

No deployments
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.

Deprecate exit_code and status_message in the Actor constructor

2 participants