Skip to content

Make Configuration immutable #2549

Done

Description

@vdusek

Configuration instances are mutable, so code can change a setting after components have read it, for example configuration.purge_on_start = False. Crawlee JS v4 made Configuration immutable in apify/crawlee#3484.

Make it immutable in Python too, with frozen=True on the settings model. To change a setting, create a new instance with the value, or use model_copy(update=...).

Before the change, check:

  • The docs: 4 files in docs/ assign to a configuration attribute and need to create the instance with the value instead.
  • apify-sdk-python: its Configuration subclasses the Crawlee one (src/apify/_configuration.py) and must keep working when frozen.

This is a breaking change. Split out of #2335.

✍️ Drafted by Claude Code

Activity

  1. added this to the 2.0 milestone on Nov 30, 2026
  2. added
    t-tooling
    debt
    on Nov 30, 2026
  3. assigned and unassigned on Nov 30, 2026
  4. added a commit that references this issue on Dec 1, 2026
    3b92d08
  5. vdusek commented on Dec 1, 2026

    @vdusek
    CollaboratorAuthor

    resolved by #2555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

debtt-tooling

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions