Skip to content

Conversation

RealOrangeOne
Copy link
Owner

Attributes of a TaskResult should never be updated, since in most cases it doesn't do anything. Making them frozen prevents this, and as a side-benefit allows them to be hashed.

The code which actually does it gets slower, but it prevents a number of potential foot-guns to be worth it. object.__setattr__ is the escape-hatch the docs recommend.

The code which actually does it gets slower, but it prevents a number of potential foot-guns
@RealOrangeOne RealOrangeOne added the tasks-api Issues relating to the tasks API and general API contract from the library label Aug 30, 2024
@RealOrangeOne RealOrangeOne merged commit c7d1e16 into master Aug 30, 2024
41 checks passed
@RealOrangeOne RealOrangeOne deleted the feature/immutable-result branch August 30, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks-api Issues relating to the tasks API and general API contract from the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant