Skip to content

[Bug] Function type hint lookup cache key is bad #159

Closed
@cretz

Description

@cretz

Describe the bug

A function's __qualname__ is not unique enough for caching type hints (we found this out while writing Python sample tests w/ same-named workflow classes). The name is only qualified to the class level, not higher. We can find a way to qualify this (can get complicated with inheritance and modules and such), or just remove the type hint cache. If we start storing the type hints on the definitions of things themselves, the need for a cache may be obviated.

Also, please test that typing.Set[foo] as a return type works with client. Preliminary review shows that we are excluded return type hints that don't satisfy inspect.isclass which these typing wrappers do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions