-
fix(exceptions): restore backwards compatibility for instructor.exceptions imports (#1789)
发布于
2025-08-27 22:19:39 +00:00 Summary
- Restore backwards compatibility for
instructor.exceptionsimports
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 moduleinstructor/exceptions.py. This caused imports
likefrom instructor.exceptions import InstructorRetryExceptionto
fail, breaking downstream applications without warning.Solution
- Recreated
instructor/exceptions.pywith 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.exceptionsimports
with deprecation warnings and bumps version to 1.11.2.- Behavior:
- Reintroduces
instructor/exceptions.pyto restore backwards
compatibility for imports likefrom instructor.exceptions import InstructorRetryException. - Adds deprecation warning in
instructor/exceptions.pyto guide
users toinstructor.core.- Versioning:
- Bumps version to 1.11.2 in
pyproject.tomlanduv.lockfor
backwards compatibility fix.
This description was created by
forff9d88f03d. You can
customize this
summary. It will automatically update as commits are pushed.下载附件
- Restore backwards compatibility for