5 Commits

Author SHA1 Message Date
Mose Müller
61b69d77cc Merge pull request #229 from tiqi-group/release-v0.10.14
updates to version 0.10.14
2025-05-21 09:51:38 +02:00
Mose Müller
8abe9357cf updates to version 0.10.14 2025-05-21 09:51:17 +02:00
Mose Müller
0dace2a9f0 Merge pull request #228 from tiqi-group/fix/aiohttp_socks_dependency
fix: using client without aiohttp_socks dependency does not raise
2025-05-21 09:49:29 +02:00
Mose Müller
9992ade0ed chore: formatting 2025-05-21 09:48:11 +02:00
Mose Müller
6c2cebada2 fix: using client without aiohttp_socks dependency does not raise
When not specifying the proxy_url in `pydase.Client`, the aiohttp_socks
dependency is not required. This is now handled by putting the import
into the correct place, adding a descriptive log message when the import
fails.
2025-05-21 09:46:20 +02:00
2 changed files with 13 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "pydase"
version = "0.10.13"
version = "0.10.14"
description = "A flexible and robust Python library for creating, managing, and interacting with data services, with built-in support for web and RPC servers, and customizable features for diverse use cases."
authors = [
{name = "Mose Müller",email = "mosemueller@gmail.com"}

View File

@@ -3,11 +3,11 @@ import logging
import sys
import threading
import urllib.parse
from builtins import ModuleNotFoundError
from types import TracebackType
from typing import TYPE_CHECKING, Any, TypedDict, cast
import aiohttp
import aiohttp_socks.connector
import socketio # type: ignore
from pydase.client.proxy_class import ProxyClass
@@ -150,6 +150,17 @@ class Client:
def _initialize_socketio_client(self) -> None:
if self._proxy_url is not None:
try:
import aiohttp_socks.connector
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Missing dependency 'aiohttp_socks'. To use SOCKS5 proxy support, "
"install the optional 'socks' extra:\n\n"
' pip install "pydase[socks]"\n\n'
"This is required when specifying a `proxy_url` for "
"`pydase.Client`."
)
session = aiohttp.ClientSession(
connector=aiohttp_socks.connector.ProxyConnector.from_url(
url=self._proxy_url, loop=self._loop