Sitelet https://github.com/temporalio/sdk-python/pull/1261
Skip to content

OpenAI - Fix generics is instance - #1261

Merged
VegetarianOrc merged 2 commits into
mainfrom
openai/fix_generics_is_instance
Dec 19, 2025
Merged

VegetarianOrc merged 2 commits into
mainfrom
openai/fix_generics_is_instance

Conversation

@tconley1428

Copy link
Copy Markdown
Contributor

What was changed

Replace isinstance(t, type(Tool)) with checking only for callable. This is the common failure case where an activity is passed directly. This and all other such problems should be caught by type checkers as well, but leaving this as extra protection.

Why?

Tests fail on latest dependencies due to the use of isinstance on a type which has become a subscripted generic in 0.6.4.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@tconley1428
tconley1428 requested a review from a team as a code owner December 19, 2025 20:32
@VegetarianOrc
VegetarianOrc merged commit f0bd341 into main Dec 19, 2025
25 of 27 checks passed
@VegetarianOrc
VegetarianOrc deleted the openai/fix_generics_is_instance branch December 19, 2025 21:33
brianstrauch pushed a commit to temporalio/ai-integrations that referenced this pull request Sep 3, 2026
* bump version to 1.21.1

* Restrict tool type check to reject callable because of the inability to check against generic type.

---------

Co-authored-by: Alex Mazzeo <alex.mazzeo@temporal.io>
Migrated-From: temporalio/sdk-python@f0bd341
brianstrauch pushed a commit to temporalio/ai-integrations that referenced this pull request Sep 3, 2026
* bump version to 1.21.1

* Restrict tool type check to reject callable because of the inability to check against generic type.

---------

Co-authored-by: Alex Mazzeo <alex.mazzeo@temporal.io>
Migrated-From: temporalio/sdk-python@f0bd341
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants