From 6cc66a3df166a3633baed576c4fff27b0fa05b89 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 7 May 2026 09:57:21 -0400 Subject: [PATCH 1/2] Update video_out_bitrate deprecation to use sphinx directive. Replaces the inline `[DEPRECATED]` tag with a `.. deprecated:: 1.1.0` directive per CONTRIBUTING.md docstring conventions, so the deprecation shows up properly in the rendered docs. --- src/pipecat/transports/base_transport.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pipecat/transports/base_transport.py b/src/pipecat/transports/base_transport.py index 457844930..634cb53f5 100644 --- a/src/pipecat/transports/base_transport.py +++ b/src/pipecat/transports/base_transport.py @@ -47,7 +47,13 @@ class TransportParams(BaseModel): video_out_is_live: Enable real-time video output streaming. video_out_width: Video output width in pixels. video_out_height: Video output height in pixels. - video_out_bitrate: [DEPRECATED] Video output bitrate in bits per second. + video_out_bitrate: Video output bitrate in bits per second. + + .. deprecated:: 1.1.0 + Use provider-specific settings instead (e.g., + ``DailyParams.camera_out_send_settings``). This parameter will + be removed in 2.0.0. + video_out_framerate: Video output frame rate in FPS. video_out_color_format: Video output color format string. video_out_codec: Preferred video codec for output (e.g., 'VP8', 'H264', 'H265'). From 954f63dc7be1f8a02029f93cc0afc78b7e8b3f60 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 7 May 2026 10:03:43 -0400 Subject: [PATCH 2/2] Document deprecation docstring convention in CLAUDE.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an explicit Code Style bullet for the `.. deprecated::` Sphinx directive (forbidding inline `[DEPRECATED]` tags) and extends the Docstring Example with a Pydantic params class showing the directive inside a `Parameters:` block — the context CONTRIBUTING.md's existing example didn't cover. --- CLAUDE.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 123307489..977462d6f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -105,6 +105,7 @@ All data flows as **Frame** objects through a pipeline of **FrameProcessors**: ## Code Style - **Docstrings**: Google-style. Classes describe purpose; `__init__` has `Args:` section; dataclasses use `Parameters:` section. +- **Deprecations**: Use the `.. deprecated:: ` Sphinx directive in docstrings (never inline tags like `[DEPRECATED]`), and pair it with a runtime `warnings.warn(..., DeprecationWarning)` at the call site. See `CONTRIBUTING.md` for full conventions. - **Linting**: Ruff (line length 100). Pre-commit hooks enforce formatting. - **Type hints**: Required for complex async code. - **Dataclass vs Pydantic**: Use `@dataclass` for frames and internal pipeline data (high-frequency, no validation needed). Use Pydantic `BaseModel` for configuration, parameters, metrics, and external API data (benefits from validation and serialization). Specifically: @@ -138,6 +139,22 @@ class MyService(LLMService): **kwargs: Additional arguments passed to parent. """ super().__init__(**kwargs) + + +# Pydantic params class with a deprecated field +class MyParams(BaseModel): + """Configuration parameters for MyService. + + Parameters: + new_setting: Replacement for ``old_setting``. + old_setting: Legacy setting, no longer used. + + .. deprecated:: 1.2.0 + Use ``new_setting`` instead. Will be removed in 2.0.0. + """ + + new_setting: str = "default" + old_setting: str | None = None ``` ## Service Implementation