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

Metadata

Metadata

Assignees

Labels

breaking-changeBackwards-incompatible API change

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions