Description
Is your feature request related to a problem? Please describe.
Builtin python type hints for collections were added in python 3.9 so we should make sure that our type validation features such as Pipeline().connect()
work with these builtin types.
Currently we promote using the typing
module within Haystack and our tests are mostly focused on that.
Describe the solution you'd like
As a first step add tests to the following files:
- https://github.com/deepset-ai/haystack/blob/main/test/utils/test_type_serialization.py
- https://github.com/deepset-ai/haystack/blob/main/test/core/pipeline/test_type_utils.py
Specifically we need to include tests where we use list
, dict
, set
, tuple
as containers and see if our type utility functions work as expected.
If any problems arise while creating these tests, open new issues in Haystack that contain the failing tests so we can expand our type utilities to work with the native types.
Additional context
This issue #9545 is related but not quite the same. This issue has more to do with us not properly supporting the |
operator which replaced the Union
type in python 3.10.