Fix duplicate attribute docs in SessionExtensionComponents The docs build runs Sphinx with --fail-on-warning. SessionExtensionComponents documented its fields in both a napoleon `Attributes:` section and the dataclass class-body annotations, so autoapi emitted each field twice and the build failed with six "duplicate object description" warnings. Move each field's description to a per-field docstring under its annotation so autoapi renders exactly one entry per field. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
diff --git a/python/datafusion/context.py b/python/datafusion/context.py index 19b3191..9d68fec 100644 --- a/python/datafusion/context.py +++ b/python/datafusion/context.py
@@ -165,23 +165,24 @@ must be created against the context passed to that method; components bound to any other context hold a task-context provider for the wrong session and cannot be rebound. - - Attributes: - logical_extension_codecs: Logical codecs to add to the session's codec - chain, in declaration order. - physical_extension_codecs: Physical codecs to add to the session's - codec chain, in declaration order. - query_planner: Optional query planner. At most one extension per - :py:meth:`SessionContext.with_extensions` call may supply one. """ logical_extension_codecs: tuple[ LogicalExtensionCodecExportable | _PyCapsule, ... ] = () + """Logical codecs to add to the session's codec chain, in declaration order.""" + physical_extension_codecs: tuple[ PhysicalExtensionCodecExportable | _PyCapsule, ... ] = () + """Physical codecs to add to the session's codec chain, in declaration order.""" + query_planner: QueryPlannerExportable | _PyCapsule | None = None + """Optional query planner. + + At most one extension per :py:meth:`SessionContext.with_extensions` call may + supply one. + """ class SessionExtensionExportable(Protocol):