Skip to content

Decide: should BaseVarShadowsInheritedVarError (#7077) stay a hard error with no opt-out, or be a warning first? #7263

Description

@masenf

#7077 ships a hard BaseVarShadowsInheritedVarError at class-creation time when a substate redeclares a base var it inherits from a parent state. The PR discussion considered emitting a warning instead. Apps that silently redeclared an inherited var on 0.9.11.post1 (which gave them the wrong value and non-reactive class access, #7074) now fail at import with no opt-out.

The 0.9.12a1 pre-release QA verified the error fires where 0.9.11.post1 was silent or crashed with KeyError: '__module__', and flagged the policy itself as a maintainer decision:

  • keep the hard error and make sure the Breaking Changes entry says so explicitly (what breaks, how to fix it), or
  • downgrade to a deprecation warning for one release and raise in the next.

Related: #7074 (the silent-shadowing bug), #7190 / #7206 (the same guard bypassed through a mixin), and the backend-var gap filed separately from this campaign.

Source: "Decisions needed from a maintainer" in RELEASE_PLAN.md; verification in router_vars/.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions