Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HTTPXODUS_RECON.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# HTTPXodus Recon — weaviate-python-client
Target: weaviate/weaviate-python-client (python-weaviate)
Author: xic <xiechen@cls.cn>
Status: recon complete; zero competitors; import OK; branch httpxodus/weaviate-recon
Network: HTTPS_PROXY=http://127.0.0.1:7890
Constraints: no AI co-author signature; no force-push; dual import verified
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ platforms = any
include_package_data = True
install_requires =
httpx>=0.26.0,<0.29.0
httpx2>=2.12.0; python_version >= "3.10"
validators>=0.34.0,<1.0.0
authlib>=1.6.7,<2.0.0
# When bumping authlib to >=2.0.0, remove the `authlib.jose` deprecation
Expand Down
5 changes: 4 additions & 1 deletion weaviate/aliases/executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Dict, Generic, List, Optional, cast

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.aliases.alias import AliasReturn, _WeaviateAlias
from weaviate.connect import executor
Expand Down
5 changes: 4 additions & 1 deletion weaviate/backup/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import time
from typing import Dict, Generic, List, Literal, Optional, Tuple, Union

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.backup.backup import (
STORAGE_NAMES,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/client_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
cast,
)

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.collections.classes.internal import _GQLEntryReturnType, _RawGQLReturn
from weaviate.integrations import _Integrations
Expand Down
5 changes: 4 additions & 1 deletion weaviate/cluster/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import uuid
from typing import Generic, List, Optional, Union

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.cluster.models import (
ClusterStatistics,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/cluster/replicate/executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Generic, Literal, Optional, overload

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.cluster.models import (
ReplicateOperation,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/aggregations/base_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import pathlib
from typing import Generic, List, Optional, TypeVar, Union, cast

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response
from typing_extensions import ParamSpec

from weaviate.collections.classes.aggregate import (
Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/batch/rest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Dict, List, Optional

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.collections.classes.batch import (
BatchReference,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/collections/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
Union,
)

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response
from pydantic import ValidationError

from weaviate.collections.classes.config import (
Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/config/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
overload,
)

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response
from pydantic_core import ValidationError
from typing_extensions import deprecated

Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/data/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
overload,
)

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.collections.batch.base import _BatchDataWrapper
from weaviate.collections.batch.collection import (
Expand Down
5 changes: 4 additions & 1 deletion weaviate/collections/tenants/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from math import ceil
from typing import Any, Dict, Generic, List, Optional, Sequence, Union

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.collections.classes.tenants import (
Tenant,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/connect/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from typing import Awaitable, Callable, Dict, List, Optional, Union

import httpx
try:
import httpx2 as httpx
except ImportError:
import httpx
from authlib.integrations.httpx_client import ( # type: ignore
AsyncOAuth2Client,
OAuth2Client,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/connect/v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
from grpc.aio import Channel as AsyncChannel # type: ignore

# from grpclib.client import Channel
from httpx import (
try:
from httpx2 import (
except ImportError:
from httpx import (
AsyncClient,
AsyncHTTPTransport,
Client,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/debug/executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Dict, Generic, Optional

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.classes.config import ConsistencyLevel
from weaviate.connect import executor
Expand Down
5 changes: 4 additions & 1 deletion weaviate/embedded.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
from pathlib import Path
from typing import Dict, Optional, Tuple

import httpx
try:
import httpx2 as httpx
except ImportError:
import httpx
import validators

from weaviate import exceptions
Expand Down
5 changes: 4 additions & 1 deletion weaviate/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from json.decoder import JSONDecodeError
from typing import Optional, Tuple, Union, cast

import httpx
try:
import httpx2 as httpx
except ImportError:
import httpx
from grpc import Call, StatusCode # type: ignore
from grpc.aio import AioRpcError # type: ignore
from packaging import version
Expand Down
5 changes: 4 additions & 1 deletion weaviate/export/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import time
from typing import Generic, List, Literal, Tuple, Union, overload

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.backup.backup import STORAGE_NAMES
from weaviate.connect import executor
Expand Down
5 changes: 4 additions & 1 deletion weaviate/groups/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from typing import Dict, Generic, List, Literal, Union, overload

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.connect import executor
from weaviate.connect.v4 import ConnectionType, _ExpectedStatusCodes
Expand Down
5 changes: 4 additions & 1 deletion weaviate/rbac/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import json
from typing import Dict, Generic, List, Optional, Sequence, Union, cast

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response
from typing_extensions import deprecated

from weaviate.connect import executor
Expand Down
5 changes: 4 additions & 1 deletion weaviate/tokenization/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from typing import Any, Dict, Generic, List, Optional, Union, overload

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response

from weaviate.collections.classes.config import (
StopwordsConfig,
Expand Down
5 changes: 4 additions & 1 deletion weaviate/users/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from datetime import datetime, timezone
from typing import Any, Dict, Generic, List, Literal, Optional, Union, cast, overload

from httpx import Response
try:
from httpx2 import Response
except ImportError:
from httpx import Response
from typing_extensions import deprecated

from weaviate.connect import executor
Expand Down
5 changes: 4 additions & 1 deletion weaviate/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
from typing import Any, Callable, Dict, Generator, List, Optional, Sequence, Tuple, Union, cast
from urllib.parse import quote

import httpx
try:
import httpx2 as httpx
except ImportError:
import httpx
import validators

from weaviate.exceptions import (
Expand Down