Skip to content

Remove constants=None; explicit None raises with migration hint #261

Description

@derek73

Completes #260 (which ships Constants.copy() and the DeprecationWarning in 1.4). In 2.0, explicit constants=None raises TypeError naming both replacements:

  • constants=Constants() for fresh library defaults
  • constants=CONSTANTS.copy() for a private snapshot of current shared config

It must raise, never be reinterpreted — silently flipping None to mean "shared" would invisibly change behavior for every existing caller.

Checklist

  • Explicit None raises TypeError with the migration hint
  • Remove the None-constructs-Constants() branch from __init__; annotation narrows to constants: Constants = CONSTANTS
  • Update customize.rst mentions and the migration section

Activity

  1. added this to the v2.0 milestone on Jul 6, 2026
  2. self-assigned this
    on Jul 6, 2026
  3. derek73 commented on Jul 28, 2026

    @derek73
    OwnerAuthor

    Shipped in 2.0.0. Delivery and release-log coverage were verified issue-by-issue in the pre-release milestone audit.

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

Metadata

Metadata

Assignees

Labels

breaking-changeBackwards-incompatible API change

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions