forked from genewildish/Mainline
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:
@@ -18,6 +18,11 @@ class RenderStage(Stage):
|
|||||||
- Selects headlines and renders them to blocks
|
- Selects headlines and renders them to blocks
|
||||||
- Applies camera scroll position
|
- Applies camera scroll position
|
||||||
- Adds firehose layer if enabled
|
- 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__(
|
def __init__(
|
||||||
@@ -30,6 +35,15 @@ class RenderStage(Stage):
|
|||||||
firehose_enabled: bool = False,
|
firehose_enabled: bool = False,
|
||||||
name: str = "render",
|
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.name = name
|
||||||
self.category = "render"
|
self.category = "render"
|
||||||
self.optional = False
|
self.optional = False
|
||||||
|
|||||||
Reference in New Issue
Block a user