Skip to content

fix: use tuple form for SpeechGroupSpanData __slots__#3534

Merged
seratch merged 1 commit into
openai:mainfrom
jluocsa:fix/speech-group-slots-tuple
May 31, 2026
Merged

fix: use tuple form for SpeechGroupSpanData __slots__#3534
seratch merged 1 commit into
openai:mainfrom
jluocsa:fix/speech-group-slots-tuple

Conversation

@jluocsa
Copy link
Copy Markdown
Contributor

@jluocsa jluocsa commented May 31, 2026

Summary

SpeechGroupSpanData.__slots__ is assigned a bare string "input" instead of a one-element tuple. Because Python treats a string as an iterable, this creates five single-character slots (i, n, p, u, t) rather than a single input slot — so the class does not get the intended __slots__ for its actual attribute.

# before
__slots__ = "input"

# after
__slots__ = ("input",)

Every other SpanData subclass in this file already uses the tuple form (e.g. ("input", "output", "usage")), so this aligns SpeechGroupSpanData with the rest and ensures self.input is backed by a real slot.

Checks

  • ruff check src/agents/tracing/span_data.py — passes
  • ruff format --check src/agents/tracing/span_data.py — already formatted
  • One-line change, no behavior change other than the intended slot fix.

__slots__ was assigned the bare string "input", which Python treats as
an iterable of single characters, creating slots i, n, p, u, t instead
of a single input slot. Every other SpanData subclass uses tuple form;
align this one to ("input",).
@seratch seratch enabled auto-merge (squash) May 31, 2026 05:04
@seratch seratch merged commit bd8b1b7 into openai:main May 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants