fix(views): remove stray space in @deprecated new_target log message#42218
Conversation
The message concatenation left a stray space before the period
("...version 5.0.0 . Use the following...") whenever new_target was
set (e.g. Superset.explore_json's deprecation warning in production
logs). Cosmetic only, no behavior change.
Code Review Agent Run #69e703Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42218 +/- ##
==========================================
- Coverage 65.19% 65.19% -0.01%
==========================================
Files 2768 2768
Lines 156081 156081
Branches 35719 35719
==========================================
- Hits 101754 101751 -3
- Misses 52365 52367 +2
- Partials 1962 1963 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Decisions made that were not in the instructions
None.
What was the warning?
Production logs show
Superset.explore_json This API endpoint is deprecated and will be removed in version 5.0.0— emitted by the shared@deprecated()decorator insuperset/views/base.py, used across several endpoints insuperset/views/core.py(explore_json,explore_json_data,warm_up_cache, etc).What changed
When a
@deprecated()call site setsnew_target, the message concatenation left a stray space before the period:instead of the intended:
One-character fix:
" . Use..."→". Use..."insuperset/views/base.py. Added a regression test (test_deprecated_new_target_message_has_no_stray_space) asserting the formatted message has no stray space before the period.No-behavior-change note
This only touches the deprecation warning's log message text. It does not change the deprecated endpoint's behavior, routing, permissions, or the
@deprecated()decorator's once-per-process warning semantics. Theexplore_jsonendpoint itself remains deprecated and unchanged — it's an intentional, architectural deprecation and out of scope here. Note #41714 is a separate in-flight effort to remove the legacyexplore_json/viz.pypipeline entirely; this PR is just a stopgap message-hygiene fix for current production logs in the meantime.Test plan
tests/unit_tests/views/test_base.py— addedtest_deprecated_new_target_message_has_no_stray_space; ran the full file (32 tests) locally, all pass.ruff check/ruff format --checkclean.pre-commit runclean (mypy, ruff, pylint, etc.).