-
Notifications
You must be signed in to change notification settings - Fork 112
Deprecate legacy APIs (raise DeprecatedError)
#611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #611 +/- ##
==========================================
+ Coverage 44.46% 45.34% +0.88%
==========================================
Files 22 22
Lines 2305 2236 -69
Branches 362 354 -8
==========================================
- Hits 1025 1014 -11
+ Misses 1133 1079 -54
+ Partials 147 143 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
why: collapse multiple CHANGES edits into a single entry with correct Sphinx links. what: - keep future release placeholder visible - provide api-linked table for deprecated items now raising DeprecatedError - reference migration doc for details
why: collapse multiple CHANGES edits into a single entry with correct Sphinx links. what: - keep future release placeholder visible - provide api-linked table for deprecated items now raising DeprecatedError - reference migration doc for details
Code reviewFound 1 issue:
The MIGRATION file documents three different versions for the same deprecation:
The code version 0.16.0 appears to be correct based on docstrings. The MIGRATION tables should be updated for consistency. Lines 60 to 62 in 2a4771c
Lines 71 to 79 in 2a4771c
Generated with Claude Code - If this code review was useful, please react with a thumbs up. Otherwise, react with a thumbs down. |
why: collapse multiple CHANGES edits into a single entry with correct Sphinx links. what: - keep future release placeholder visible - provide api-linked table for deprecated items now raising DeprecatedError - reference migration doc for details
why: collapse multiple CHANGES edits into a single entry with correct Sphinx links. what: - keep future release placeholder visible - provide api-linked table for deprecated items now raising DeprecatedError - reference migration doc for details
why: collapse multiple CHANGES edits into a single entry with correct Sphinx links. what: - keep future release placeholder visible - provide api-linked table for deprecated items now raising DeprecatedError - reference migration doc for details
28349a8 to
babc0e8
Compare
…or (#611) why: Legacy APIs deprecated in 0.16-0.33 should now raise hard errors instead of soft warnings to encourage migration to new APIs. what: - Add DeprecatedError exception class in exc.py - Server: kill_server, get_by_id, where, find_where, list_sessions, etc. - Session: attach_session, kill_session, attached_window/pane, etc. - Window: split_window, select_window, kill_window, attached_pane, etc. - Pane: resize_pane, select_pane, split_window, dict access - Keep 0.50 deprecations (g param, window options) as soft warnings
why: Tests need to verify DeprecatedError is raised for legacy APIs. what: - Update legacy_api tests to use pytest.raises(DeprecatedError) - Update other tests to use new APIs instead of deprecated ones - Use namespace imports for exception classes
why: Users need a single reference for all deprecated APIs. what: - Add method renamings table with Since/Raises columns - Add property renamings table - Add parameter changes table - Add query/filter API changes table - Add attribute access changes table - Add removed items table - Add default behavior changes table
why: Changelog needs to document breaking changes. what: - Add APIs deprecated section listing all affected methods - Reference MIGRATION for full context - Note 0.50 deprecations remain as soft warnings
67a5109 to
e791819
Compare
…or (#611) why: Legacy APIs deprecated in 0.16-0.33 should now raise hard errors instead of soft warnings to encourage migration to new APIs. what: - Add DeprecatedError exception class in exc.py - Server: kill_server, get_by_id, where, find_where, list_sessions, etc. - Session: attach_session, kill_session, attached_window/pane, etc. - Window: split_window, select_window, kill_window, attached_pane, etc. - Pane: resize_pane, select_pane, split_window, dict access - Keep 0.50 deprecations (g param, window options) as soft warnings
why: Tests need to verify DeprecatedError is raised for legacy APIs. what: - Update legacy_api tests to use pytest.raises(DeprecatedError) - Update other tests to use new APIs instead of deprecated ones - Use namespace imports for exception classes
why: Users need a single reference for all deprecated APIs. what: - Add method renamings table with Since/Raises columns - Add property renamings table - Add parameter changes table - Add query/filter API changes table - Add attribute access changes table - Add removed items table - Add default behavior changes table
why: Changelog needs to document breaking changes. what: - Add APIs deprecated section listing all affected methods - Reference MIGRATION for full context - Note 0.50 deprecations remain as soft warnings
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
why: Legacy APIs deprecated in 0.16-0.33 should now raise hard errors instead of soft warnings to encourage migration to new APIs. what: - Add DeprecatedError exception class in exc.py - Server: kill_server, get_by_id, where, find_where, list_sessions, etc. - Session: attach_session, kill_session, attached_window/pane, etc. - Window: split_window, select_window, kill_window, attached_pane, etc. - Pane: resize_pane, select_pane, split_window, dict access - Keep 0.50 deprecations (g param, window options) as soft warnings
why: Tests need to verify DeprecatedError is raised for legacy APIs. what: - Update legacy_api tests to use pytest.raises(DeprecatedError) - Update other tests to use new APIs instead of deprecated ones - Use namespace imports for exception classes
why: Users need a single reference for all deprecated APIs. what: - Add method renamings table with Since/Raises columns - Add property renamings table - Add parameter changes table - Add query/filter API changes table - Add attribute access changes table - Add removed items table - Add default behavior changes table
why: Changelog needs to document breaking changes. what: - Add APIs deprecated section listing all affected methods - Reference MIGRATION for full context - Note 0.50 deprecations remain as soft warnings
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
DeprecatedError )DeprecatedError)
Convert deprecated APIs to raise
DeprecatedErrorinstead ofDeprecationWarningfor legacy session/window/pane helpers, dict-style access, and old method/property
names deprecated in versions 0.16-0.33.
Breaking Changes
DeprecatedError(hard error) instead of emitting warningskill_server(),attach_session(),kill_session(),split_window(),select_window(),kill_window(),resize_pane(),select_pane(), dict access,where(),find_where(),get_by_id(),attached_window,attached_pane,childrenproperty, and moreSoft Warnings (Continuing)
gparameter on options/hooks methods (useglobal_instead)set_window_option(),show_window_option(),show_window_options()(0.50.0)Changes
DeprecatedErrorexception class with structured messagesgparameter as soft warning, update internal callsDeprecatedErroror use new APIs