发布

  • fix(exceptions): restore backwards compatibility for instructor.exceptions imports (#1789)

    frostbyte_neo 发布于 2025-08-27 22:19:39 +00:00

    Summary

    • Restore backwards compatibility for instructor.exceptions imports
      that broke in v1.11.0
    • Add deprecation warnings to guide users to new import path
      instructor.core
    • Bump version to 1.11.2 (patch version for backwards compatibility fix)

    Problem

    Version 1.11.0 introduced a breaking change by removing the backwards
    compatibility module instructor/exceptions.py. This caused imports
    like from instructor.exceptions import InstructorRetryException to
    fail, breaking downstream applications without warning.

    Solution

    • Recreated instructor/exceptions.py with proper re-exports from
      instructor.core.exceptions
    • Added deprecation warnings to guide users to the recommended import
      path
    • Used proper semantic versioning (patch bump) for a backwards
      compatibility fix

    Test plan

    • Test that old import path works: from instructor.exceptions import InstructorRetryException
    • Test that new import path still works: from instructor.core import InstructorRetryException
    • Verify deprecation warning is shown when using old import path
    • Run linting and type checking
    • Version bump to 1.11.2

    🤖 Generated with Claude Code


    Important

    Restores backwards compatibility for instructor.exceptions imports
    with deprecation warnings and bumps version to 1.11.2.

    • Behavior:
    • Reintroduces instructor/exceptions.py to restore backwards
      compatibility for imports like from instructor.exceptions import InstructorRetryException.
    • Adds deprecation warning in instructor/exceptions.py to guide
      users to instructor.core.
      • Versioning:
    • Bumps version to 1.11.2 in pyproject.toml and uv.lock for
      backwards compatibility fix.

    This description was created by Ellipsis
    for ff9d88f03d. You can
    customize this
    summary. It will automatically update as commits are pushed.

    下载附件