Skip to content

Code health: make compat shims warn and stop the suite importing through them #1936

Closed

Description

@pzfreo

Part of the code-health epic. Evidence pinned to main @ 71b8c94.

Problem

The version is 0.4.36.dev0, and these compatibility surfaces are still in the package:

  • score.py and recognition/__init__.py: "temporary" re-exports of quiddity, removal planned for 0.6.0.
  • make_drawing.py and annotate.py: annotate.py re-exports the private names _auto_annotate, _wrap_rows and _detect_step_repeat.
  • 23 compatibility properties on Drawing (drawing.py:1291).
  • Two legacy export() call shapes (drawing.py:5850).
  • Four DeprecationWarning/SoftDeprecation sites in sheet.py.

None of the four shim modules emits a DeprecationWarning, so downstream users get no notice before the 0.6.0 removal. 12 of our own test files still import through draftwright.make_drawing or draftwright.annotate.

Proposal

  • Emit a DeprecationWarning from the four shim modules on import (or on attribute access), naming the replacement and the removal version.
  • Move our own tests onto the canonical imports, leaving one test per shim that asserts the warning.
  • Make a list of the Drawing compat properties with a removal version for each.

Acceptance

  • Every shim warns.
  • No test outside the shim tests imports a shim.

Activity

  1. added
    tech-debtInternal maintainability or refactoring work
    on Sep 28, 2026
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

    tech-debtInternal maintainability or refactoring work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions