Skip to content

TypeError: unsupported operand type(s) for |: 'EnumTypeWrapper' and 'NoneType' #1155

@bugraoz93

Description

@bugraoz93

Helllo, I beleive new release introduce some breaking changes in the client. Normally, this shouldn't be problem above 3.10 but somehow it is and from __future__ import annotations ,where haven't seen any trace of it, fixes the problem although maybe there is a better solution for the repository.

platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0
rootdir: /opt/airflow
configfile: pyproject.toml
plugins: anyio-4.12.1, asyncio-1.3.0, mock-3.15.1, cov-7.0.0, requests-mock-1.12.1, kgb-7.3, rerunfailures-16.1, timeouts-1.2.1, icdiff-0.9, time-machine-3.2.0, custom-exit-code-0.3.0, instafail-0.5.0, unordered-0.7.0, xdist-3.8.0
asyncio: mode=strict, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
setup timeout: 60.0s, execution timeout: 60.0s, teardown timeout: 60.0s
collected 8991 items / 2 errors / 5 skipped
___________________________________________________________________________________________________________________ ERROR collecting providers/qdrant/tests/unit/qdrant/operators/test_qdrant.py ___________________________________________________________________________________________________________________
tests/unit/qdrant/operators/test_qdrant.py:23: in <module>
    from airflow.providers.qdrant.operators.qdrant import QdrantIngestOperator
src/airflow/providers/qdrant/operators/qdrant.py:25: in <module>
    from airflow.providers.qdrant.hooks.qdrant import QdrantHook
src/airflow/providers/qdrant/hooks/qdrant.py:24: in <module>
    from qdrant_client import QdrantClient
../../.venv/lib/python3.11/site-packages/qdrant_client/__init__.py:1: in <module>
    from .async_qdrant_client import AsyncQdrantClient as AsyncQdrantClient
../../.venv/lib/python3.11/site-packages/qdrant_client/async_qdrant_client.py:23: in <module>
    from qdrant_client.async_qdrant_remote import AsyncQdrantRemote
../../.venv/lib/python3.11/site-packages/qdrant_client/async_qdrant_remote.py:38: in <module>
    from qdrant_client.uploader.grpc_uploader import GrpcBatchUploader
../../.venv/lib/python3.11/site-packages/qdrant_client/uploader/grpc_uploader.py:24: in <module>
    update_mode: grpc.UpdateMode | None = None,
                 ^^^^^^^^^^^^^^^^^^^^^^
E   TypeError: unsupported operand type(s) for |: 'EnumTypeWrapper' and 'NoneType'

Started from version 1.17.0

I have checked a bit and couldn't find anything breaking rather maybe coming from grpc maybe 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions