weaviate-python-client icon indicating copy to clipboard operation
weaviate-python-client copied to clipboard

Fix flaky tenant input validations in different Python versions

Open tsmith023 opened this issue 1 year ago • 1 comments

In Python3.12, it is certain that the logic used when validating the inputs for tenant CRUD methods can flake perhaps due to how Python performs these typing validations under-the-hood. This may be indicative of a bug in Python but we should fix it by avoiding this flaky behaviour:

"""
weaviate.exceptions.WeaviateInvalidInputError: Invalid input provided: Argument 'tenants' must be one of:
[
  <class 'weaviate.collections.classes.tenants.Tenant'>,
  <class 'weaviate.collections.classes.tenants.TenantUpdate'>,
  typing.Sequence[
      typing.Union[weaviate.collections.classes.tenants.Tenant,
      weaviate.collections.classes.tenants.TenantUpdate]
    ]
], but got <class 'list'>.
"""

tsmith023 avatar Oct 21 '24 11:10 tsmith023

I believe that this issue is fixed, can someone close this ticker/issue?

Nitish-Kshatriya-P avatar Nov 05 '25 10:11 Nitish-Kshatriya-P