镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

chore(deprecation): remove the 35 APIs deprecated for 3.8.0 - #708

Merged
ChuckBuilds merged 3 commits into
mainfrom
chore/remove-3.8-deprecations
Oct 1, 2026
Merged

ChuckBuilds merged 3 commits into
mainfrom
chore/remove-3.8-deprecations

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Removes the 35 plugin-facing methods marked @deprecated("3.8.0"). 3.8.0 can't ship with them: test/test_deprecation.py fails once src.__version__ reaches a marker's release.

Why it's safe: scripts/plugin_api_usage.py was re-run today (docs/DEPRECATIONS_3.8.md, committed as generated). It scanned core, the 46 monorepo plugins (main @ 4de1d134, after today's merges) and the 8 third-party plugins in plugins.json, and found no call or override of any of the 35. Each method has logged a warning on first call since 3.5.0.

What's removed:

  • CacheManager (13): change detection, background-cache and metrics helpers.
  • DisplayManager (7): the weather-icon drawing methods and get_scrolling_stats.
  • FontManager (14): overrides, font catalog and stats accessors.
  • PluginManager.get_enabled_plugins.

Private helpers used only by these methods go too. The full list is in the CHANGELOG's new ### Removed section.

Kept on purpose:

  • CacheMetrics stays: disk cleanup still records into it.
  • FontManager.font_overrides / _load_overrides stay: resolve_font() still applies config/font_overrides.json.
  • The two 3.9.0 markers on BasePlugin are untouched. get_supported_vegas_modes is still used by blackjack, calendar and olympics.

Test harness: VisualTestDisplayManager loses its copies of the icon methods too. Otherwise a plugin's visual tests could pass on calls that raise AttributeError on the real display manager.

Docs: the API reference, developer quick reference, font manager guide and plugin-development guides now say these methods were removed, and point to the replacements.

Test plan

  • Full core suite: the same 61 failed and 6 errors as the baseline list, which are the pre-existing Windows failures. No new failures.
  • test_deprecation.py: PINNED holds only the 3.9.0 entries. The scanner tests now run against a small fake core with the same method names.
  • Mypy ratchet (scripts/check_types.py) passes.
  • Every removed method, private helper and attribute was grepped across src/, web_interface/, scripts/, test/ and the scan's clones of all 54 plugins. No hits.

Next: the 3.8.0 release-prep PR (version bump, changelog heading).

🤖 Generated with Claude Code

ChuckBuilds and others added 3 commits October 1, 2026 09:47
The usage scan (docs/DEPRECATIONS_3.8.md, regenerated 2026-10-01 and
committed here) finds no call or override of any of them in the 46
monorepo plugins or the 8 third-party plugins plugins.json lists; the
only core callers were other deprecated methods removed alongside.

- CacheManager: 13 methods, plus the private helpers only
  has_data_changed used (_has_*_changed, _is_market_open).
- DisplayManager: 7 methods, plus WEATHER_COLORS and the private
  _draw_sun/_cloud/_rain/_snow/_storm helpers only the icon methods used.
- FontManager: 14 methods, plus size_tokens, _save_overrides and
  _clear_plugin_font_cache. font_overrides and _load_overrides stay:
  resolve_font() still applies config/font_overrides.json.
  performance_stats stays: get_font() keeps it and tests read it.
- PluginManager.get_enabled_plugins.

test_deprecation.py pins only the two 3.9.0 markers now; the scanner
tests run against a stand-in core instead of the real markers. The
memory-tier tests read stats through log_memory_cache_stats() and the
component, and the test of the removed _clear_plugin_font_cache goes.
Docs drop the removed methods' reference entries; the Deprecated APIs
table becomes "Removed in 3.8.0". CHANGELOG gains a Removed section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n methods

VisualTestDisplayManager still drew weather icons that DisplayManager no
longer has, so a plugin's visual tests could pass on calls that raise
AttributeError on the real display. Its draw_sun/draw_cloud/draw_rain/
draw_snow/draw_weather_icon/draw_text_with_icons, WEATHER_COLORS and the
private helpers go, with the tests that exercised them. The CHANGELOG's
Deprecations entries no longer say nothing is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: de99e854-28f6-4e14-a8b1-44fb09b4ec68

📥 Commits

Reviewing files that changed from the base of the PR and between 7958348 and ce6840a.

📒 Files selected for processing (16)
  • CHANGELOG.md
  • docs/ADVANCED_PLUGIN_DEVELOPMENT.md
  • docs/DEPRECATIONS_3.8.md
  • docs/DEVELOPER_QUICK_REFERENCE.md
  • docs/FONT_MANAGER.md
  • docs/PLUGIN_API_REFERENCE.md
  • docs/PLUGIN_DEVELOPMENT_GUIDE.md
  • src/cache_manager.py
  • src/display_manager.py
  • src/font_manager.py
  • src/plugin_system/plugin_manager.py
  • src/plugin_system/testing/visual_display_manager.py
  • test/plugins/test_visual_rendering.py
  • test/test_cache_manager_memory_tier.py
  • test/test_deprecation.py
  • test/test_font_manager.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -160 complexity

Metric Results
Complexity -160

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ChuckBuilds
ChuckBuilds merged commit 2601cb4 into main Oct 1, 2026
13 checks passed
@ChuckBuilds
ChuckBuilds deleted the chore/remove-3.8-deprecations branch October 1, 2026 14:45
ChuckBuilds added a commit that referenced this pull request Oct 5, 2026
* fix(fonts): unloading a plugin forgets its manifest fonts

PluginManager.unload_plugin() and the failed-load cleanup only called
FontManager.forget_manager_fonts(), which drops usage data. The plugin's
manifest registrations stayed: plugin_fonts / plugin_font_catalogs, its
plugin_id::family entries in font_catalog, and cached font objects for them
-- so its fonts kept resolving after unload and a family a reinstalled
manifest dropped stayed registered. The deprecated unregister_plugin_fonts
did this cleanup but nothing called it; it was removed in #708.

Add FontManager.forget_plugin_fonts(plugin_id) and call it from both
paths alongside forget_manager_fonts (each guarded on its own, so a font
manager stub with only one still works). FontManager takes no locks, so
like forget_manager_fonts it uses atomic pops over snapshots. A reload
(unload + load) registers the manifest fonts again and they resolve.

Raised by CodeRabbit on #709.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(fonts): call the font manager's forget methods without a None-able local

Pylint E1102 (Codacy) read getattr(..., None) as possibly not callable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant