weaviate / weaviate/weaviate-python-client
Fix flaky tenant input validations in different Python versions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 227
- Forks
- 151
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 11
Description
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'>.
"""
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the tenant CRUD methods and the input-validation logic that accepts Tenant, TenantUpdate, or sequences of them. Reproduce the validation behavior across the relevant Python versions, then confirm that valid tenant inputs are accepted consistently and that coverage captures the previously flaky case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100