Skip to content

Make Trace class inherit from abc.ABC for proper abstract base class behavior #1233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 25, 2025

Conversation

DanielHashmi
Copy link
Contributor

The Trace class was using @abc.abstractmethod decorators without inheriting
from abc.ABC, which meant the abstract methods weren't enforced.

This change makes the class properly abstract while maintaining all existing functionality
since no code directly instantiates Trace() - all usage goes through the
concrete implementations NoOpTrace and TraceImpl.

@seratch seratch added enhancement New feature or request feature:tracing labels Jul 24, 2025
@seratch seratch requested a review from rm-openai July 24, 2025 11:29
@rm-openai rm-openai merged commit 64b4a5f into openai:main Jul 25, 2025
7 checks passed
@DanielHashmi DanielHashmi deleted the fix_trace_class_abc_inconsistency branch July 25, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants