refactor(deprecate): Add deprecation warning to RenderStage (Phase 4.1)

- Add DeprecationWarning to RenderStage.__init__()
- Document that RenderStage uses legacy rendering code
- Recommend modern pipeline stages as replacement
- ItemsStage already has deprecation warning
- Tests pass (515 core tests, legacy failures pre-existing)
This commit is contained in:
2026-03-16 20:53:02 -07:00
parent 0980279332
commit 7c69086fa5

View File

@@ -18,6 +18,11 @@ class RenderStage(Stage):
- Selects headlines and renders them to blocks
- Applies camera scroll position
- Adds firehose layer if enabled
.. deprecated::
RenderStage uses legacy rendering from engine.legacy.layers and engine.legacy.render.
This stage will be removed in a future version. For new code, use modern pipeline stages
like PassthroughStage with custom rendering stages instead.
"""
def __init__(
@@ -30,6 +35,15 @@ class RenderStage(Stage):
firehose_enabled: bool = False,
name: str = "render",
):
import warnings
warnings.warn(
"RenderStage is deprecated. It uses legacy rendering code from engine.legacy.*. "
"This stage will be removed in a future version. "
"Use modern pipeline stages with PassthroughStage or create custom rendering stages instead.",
DeprecationWarning,
stacklevel=2,
)
self.name = name
self.category = "render"
self.optional = False