Commit f178806
authored
fix(exceptions): restore backwards compatibility for instructor.exceptions imports (#1789)
## 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
- [x] Test that old import path works: `from instructor.exceptions
import InstructorRetryException`
- [x] Test that new import path still works: `from instructor.core
import InstructorRetryException`
- [x] Verify deprecation warning is shown when using old import path
- [x] Run linting and type checking
- [x] Version bump to 1.11.2
🤖 Generated with [Claude Code](https://claude.ai/code)
<!-- ELLIPSIS_HIDDEN -->
----
> [!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.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=567-labs%2Finstructor&utm_source=github&utm_medium=referral)<sup>
for ff9d88f. You can
[customize](https://app.ellipsis.dev/567-labs/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->3 files changed
+44
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments