Investigate instructor client import errors#1818
Conversation
Co-authored-by: jason <[email protected]>
|
Cursor Agent can help with this pull request. Just |
|
Claude finished @jxnl's task —— View job Pull Request ReviewI've completed my review of this PR that addresses the critical breaking change where Todo List:
🟢 Overall Assessment: LGTMThis is a well-implemented backward compatibility fix that addresses a critical breaking change. The solution is minimal, clean, and follows good deprecation practices. Code Quality & Best Practices ✅
Bug Prevention ✅
Performance Considerations ✅
Security Concerns ✅No security implications - this is purely a backward compatibility shim that doesn't introduce new attack vectors or expose sensitive functionality. Test Coverage
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
instructor | 91245da | Sep 25 2025, 02:50 PM |
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 91245da in 1 minute and 22 seconds. Click for details.
- Reviewed
34lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. instructor/__init__.py:66
- Draft comment:
Re-exporting 'client' for backward compatibility is clear. Consider adding a deprecation warning if this alias is temporary. - Reason this comment was not posted:
Confidence changes required:33%<= threshold85%None
2. instructor/providers/writer/client.py:30
- Draft comment:
Return type annotation updated to use instructor.Instructor instead of instructor.client.Instructor for consistency with the re-export. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
Workflow ID: wflow_sh3CmJj1tFOv9WnN
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
fix: re-expose instructor.client for backward compatibility
Describe your changes
This PR addresses the critical breaking change where
instructor.clientwas no longer directly accessible, causingAttributeErrorfor users.The changes re-expose
clientininstructor/__init__.pyto restore backward compatibility, allowinginstructor.client.Instructorandinstructor.client.AsyncInstructorto function again. Deprecation warnings are in place to guide users towards the new direct import paths. Additionally, an internal reference ininstructor/providers/writer/client.pywas updated for consistency.Issue ticket number and link
#1816
Checklist before requesting a review
Slack Thread
Important
Re-expose
instructor.clientfor backward compatibility and update internal references infrom_writer().clientininstructor/__init__.pyfor backward compatibility, allowinginstructor.client.Instructorandinstructor.client.AsyncInstructorto work.from_writer()ininstructor/providers/writer/client.pyto useinstructor.Instructorandinstructor.AsyncInstructordirectly.This description was created by
for 91245da. You can customize this summary. It will automatically update as commits are pushed.