voxutils 0.7.2__tar.gz → 0.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {voxutils-0.7.2 → voxutils-0.7.4}/PKG-INFO +3 -3
- {voxutils-0.7.2 → voxutils-0.7.4}/pyproject.toml +2 -2
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/amqpclient.py +79 -22
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/asyncutils.py +86 -2
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/config.py +9 -5
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/httpclient.py +8 -7
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/systemservice.py +58 -30
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/utils.py +13 -71
- {voxutils-0.7.2 → voxutils-0.7.4}/uv.lock +24 -24
- {voxutils-0.7.2 → voxutils-0.7.4}/.gitignore +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/.python-version +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/README.md +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/__init__.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/abc.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/amiclient.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/exceptions.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/log.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/postgresdriver.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/py.typed +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/retrytimer.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/src/voxutils/types.py +0 -0
- {voxutils-0.7.2 → voxutils-0.7.4}/tests/postgresdriver_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: voxutils
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: Telephony-related utilities
|
|
5
5
|
Author-email: Nikša Baldun <niksa.baldun@voxdiversa.hr>
|
|
6
6
|
Classifier: Typing :: Typed
|
|
@@ -11,7 +11,7 @@ Requires-Dist: aiormq>=6.9.2
|
|
|
11
11
|
Requires-Dist: aiosmtplib>=5.1.0
|
|
12
12
|
Requires-Dist: asyncpg>=0.31.0
|
|
13
13
|
Requires-Dist: orjson>=3.11.7
|
|
14
|
-
Requires-Dist: pyroute2==0.
|
|
14
|
+
Requires-Dist: pyroute2==0.9.6
|
|
15
15
|
Requires-Dist: python-magic>=0.4.27
|
|
16
16
|
Requires-Dist: pytz>=2025.2
|
|
17
17
|
Requires-Dist: tomli>=2.4.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "voxutils"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.4"
|
|
4
4
|
description = "Telephony-related utilities"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
|
14
14
|
"aiosmtplib>=5.1.0",
|
|
15
15
|
"asyncpg>=0.31.0",
|
|
16
16
|
"orjson>=3.11.7",
|
|
17
|
-
"pyroute2==0.
|
|
17
|
+
"pyroute2==0.9.6",
|
|
18
18
|
"python-magic>=0.4.27",
|
|
19
19
|
"pytz>=2025.2",
|
|
20
20
|
"tomli>=2.4.0",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from asyncio import (
|
|
3
|
-
AbstractEventLoop,
|
|
4
3
|
CancelledError,
|
|
5
4
|
Event,
|
|
6
5
|
Future,
|
|
6
|
+
Lock,
|
|
7
|
+
Task,
|
|
7
8
|
create_task,
|
|
8
|
-
|
|
9
|
+
get_running_loop,
|
|
9
10
|
sleep,
|
|
10
11
|
wait_for,
|
|
11
12
|
)
|
|
@@ -56,10 +57,12 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
56
57
|
self._status: ClientStatus = ClientStatus.UNINITIALIZED
|
|
57
58
|
self._ready_event: Event = Event()
|
|
58
59
|
self._processing_event: Event = Event()
|
|
60
|
+
self._start_lock: Lock = Lock()
|
|
59
61
|
self._is_shutting_down: bool = False
|
|
60
62
|
self._connection: Connection | None = None
|
|
61
63
|
self._channel_in: Channel | None = None
|
|
62
64
|
self._channel_out: Channel | None = None
|
|
65
|
+
self._consumer_task: Task[None] | None = None
|
|
63
66
|
self._logger_in: StructuredLogger | None = None
|
|
64
67
|
self._loggers_client: dict[str, StructuredLogger] = {}
|
|
65
68
|
if self.logger.isEnabledFor(TRACE):
|
|
@@ -101,8 +104,6 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
101
104
|
return self._ready_event
|
|
102
105
|
|
|
103
106
|
def _reconnect(self, closing: Future[T]) -> None:
|
|
104
|
-
loop: AbstractEventLoop = get_event_loop()
|
|
105
|
-
# loop.run_until_complete(self._disconnect())
|
|
106
107
|
self.logger.info('AMQP connection closed', host=self.config.host)
|
|
107
108
|
if self._is_shutting_down:
|
|
108
109
|
return
|
|
@@ -111,8 +112,8 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
111
112
|
self._channel_out = None
|
|
112
113
|
self._connection = None
|
|
113
114
|
self._ready_event.clear()
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
# Keep the consumer monitor running; it waits on _ready_event.
|
|
116
|
+
get_running_loop().create_task(self.start())
|
|
116
117
|
|
|
117
118
|
async def _consumer(self, message: DeliveredMessage) -> None:
|
|
118
119
|
await self._processing_event.wait()
|
|
@@ -147,20 +148,47 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
147
148
|
finally:
|
|
148
149
|
self._processing_event.set()
|
|
149
150
|
|
|
151
|
+
async def _ensure_consumer(self) -> None:
|
|
152
|
+
channel: Channel | None = self._channel_in
|
|
153
|
+
if channel is None:
|
|
154
|
+
raise RuntimeError('AMQP input channel is not open')
|
|
155
|
+
queue_name: str = self.config.queue
|
|
156
|
+
if queue_name in channel.consumers:
|
|
157
|
+
return
|
|
158
|
+
try:
|
|
159
|
+
await channel.basic_consume(
|
|
160
|
+
queue_name,
|
|
161
|
+
self._consumer,
|
|
162
|
+
timeout=self.config.timeout,
|
|
163
|
+
consumer_tag=queue_name,
|
|
164
|
+
)
|
|
165
|
+
except BaseException:
|
|
166
|
+
channel.consumers.pop(queue_name, None)
|
|
167
|
+
raise
|
|
168
|
+
|
|
150
169
|
async def _consumer_monitor(self) -> None:
|
|
151
170
|
queue_name: str = self.config.queue
|
|
152
171
|
timeout: int = self.config.timeout
|
|
153
172
|
while True:
|
|
154
173
|
try:
|
|
155
174
|
await self._ready_event.wait()
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
175
|
+
if self._is_shutting_down:
|
|
176
|
+
return
|
|
177
|
+
channel: Channel | None = self._channel_in
|
|
178
|
+
if channel is None or channel.is_closed:
|
|
179
|
+
raise RuntimeError('AMQP input channel is closed')
|
|
180
|
+
# Verify that the channel remains usable. Consumer cancellation
|
|
181
|
+
# notifications remove the callback from channel.consumers.
|
|
182
|
+
await channel.queue_declare(queue_name, durable=True, timeout=timeout)
|
|
183
|
+
if queue_name not in channel.consumers:
|
|
184
|
+
self.logger.warning(
|
|
185
|
+
'AMQP consumer cancelled by broker, re-registering',
|
|
186
|
+
host=self.config.host,
|
|
160
187
|
)
|
|
161
|
-
self.
|
|
188
|
+
await self._ensure_consumer()
|
|
162
189
|
except Exception:
|
|
163
190
|
self.logger.exception('AMQP consumer error', host=self.config.host)
|
|
191
|
+
await self._disconnect()
|
|
164
192
|
if self._is_shutting_down:
|
|
165
193
|
return
|
|
166
194
|
await sleep(5)
|
|
@@ -192,13 +220,17 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
192
220
|
await self._channel_out.confirm_delivery(timeout=self.config.timeout)
|
|
193
221
|
except Exception:
|
|
194
222
|
self.logger.exception(
|
|
195
|
-
'Error while
|
|
223
|
+
'Error while publishing to AMQP', routing_key=routing_key, exchange=exchange
|
|
196
224
|
)
|
|
197
225
|
await self._disconnect()
|
|
198
226
|
return False
|
|
199
227
|
return True
|
|
200
228
|
|
|
201
229
|
async def start(self) -> None:
|
|
230
|
+
async with self._start_lock:
|
|
231
|
+
await self._start()
|
|
232
|
+
|
|
233
|
+
async def _start(self) -> None:
|
|
202
234
|
if self._status in (ClientStatus.CONNECTED, ClientStatus.CONNECTING):
|
|
203
235
|
raise RuntimeError('AMQP client already started')
|
|
204
236
|
|
|
@@ -213,7 +245,8 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
213
245
|
amqp_url: str = f'amqp://{user}:{pswd}@{host}:{port}?heartbeat=1'
|
|
214
246
|
|
|
215
247
|
self._status = ClientStatus.CONNECTING
|
|
216
|
-
|
|
248
|
+
if self._consumer_task is None or self._consumer_task.done():
|
|
249
|
+
self._consumer_task = run_task(self._consumer_monitor(), f'{queue_name} AMQP consumer')
|
|
217
250
|
while True:
|
|
218
251
|
try:
|
|
219
252
|
self.logger.debug('Trying connection to AMQP', host=self.config.host)
|
|
@@ -221,26 +254,40 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
221
254
|
await wait_for(self._connection.connect(), _SOCKET_TIMEOUT)
|
|
222
255
|
self._channel_in = cast(Channel, await self._connection.channel())
|
|
223
256
|
await self._channel_in.basic_qos(prefetch_count=prefetch_count, timeout=timeout)
|
|
224
|
-
await self._channel_in.queue_declare(queue_name, durable=True)
|
|
257
|
+
await self._channel_in.queue_declare(queue_name, durable=True, timeout=timeout)
|
|
258
|
+
await self._ensure_consumer()
|
|
225
259
|
self._channel_out = cast(Channel, await self._connection.channel())
|
|
226
260
|
for client in self.clients:
|
|
227
261
|
await self._channel_out.exchange_declare(
|
|
228
|
-
exchange=client.amqp_exchange,
|
|
262
|
+
exchange=client.amqp_exchange,
|
|
263
|
+
exchange_type='fanout',
|
|
264
|
+
durable=True,
|
|
265
|
+
timeout=timeout,
|
|
229
266
|
)
|
|
230
267
|
arguments: ArgumentsType = {}
|
|
231
268
|
if client.amqp_dead_letter_exchange:
|
|
232
269
|
arguments['x-dead-letter-exchange'] = client.amqp_dead_letter_exchange
|
|
233
270
|
# Queue is assumed to have the same name as the exchange
|
|
234
271
|
await self._channel_out.queue_declare(
|
|
235
|
-
client.amqp_exchange,
|
|
272
|
+
client.amqp_exchange,
|
|
273
|
+
durable=True,
|
|
274
|
+
arguments=arguments,
|
|
275
|
+
timeout=timeout,
|
|
276
|
+
)
|
|
277
|
+
await self._channel_out.queue_bind(
|
|
278
|
+
client.amqp_exchange, client.amqp_exchange, timeout=timeout
|
|
236
279
|
)
|
|
237
|
-
await self._channel_out.queue_bind(client.amqp_exchange, client.amqp_exchange)
|
|
238
280
|
self._connection.closing.add_done_callback(self._reconnect)
|
|
239
281
|
self._status = ClientStatus.CONNECTED
|
|
240
282
|
self.retry_timer.reset()
|
|
241
283
|
self._ready_event.set()
|
|
242
284
|
self.logger.info('AMQP connection established')
|
|
243
285
|
return
|
|
286
|
+
except CancelledError:
|
|
287
|
+
self._status = ClientStatus.ERROR
|
|
288
|
+
if not self._is_shutting_down:
|
|
289
|
+
create_task(self.start())
|
|
290
|
+
raise
|
|
244
291
|
except TimeoutError:
|
|
245
292
|
self.logger.error('AMQP connection attempt timed out', host=self.config.host)
|
|
246
293
|
self._status = ClientStatus.ERROR
|
|
@@ -250,11 +297,9 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
250
297
|
except Exception:
|
|
251
298
|
self.logger.exception('Unexpected AMQP connection error', host=self.config.host)
|
|
252
299
|
self._status = ClientStatus.ERROR
|
|
253
|
-
|
|
254
|
-
self._status
|
|
255
|
-
|
|
256
|
-
create_task(self.start())
|
|
257
|
-
raise
|
|
300
|
+
finally:
|
|
301
|
+
if self._status != ClientStatus.CONNECTED:
|
|
302
|
+
await self._abort_connection()
|
|
258
303
|
|
|
259
304
|
if self._is_shutting_down:
|
|
260
305
|
return
|
|
@@ -277,6 +322,18 @@ class AmqpClient(Generic[_TC, _TP]):
|
|
|
277
322
|
def is_running(self) -> bool:
|
|
278
323
|
return self.status == ClientStatus.CONNECTED
|
|
279
324
|
|
|
325
|
+
async def _abort_connection(self) -> None:
|
|
326
|
+
self._channel_in = None
|
|
327
|
+
self._channel_out = None
|
|
328
|
+
connection: Connection | None = self._connection
|
|
329
|
+
self._connection = None
|
|
330
|
+
if connection is None:
|
|
331
|
+
return
|
|
332
|
+
try:
|
|
333
|
+
await wait_for(connection.close(), _SOCKET_TIMEOUT)
|
|
334
|
+
except (Exception, CancelledError):
|
|
335
|
+
pass
|
|
336
|
+
|
|
280
337
|
async def _disconnect(self) -> None:
|
|
281
338
|
self._ready_event.clear()
|
|
282
339
|
if self._channel_in:
|
|
@@ -8,32 +8,47 @@ from asyncio import (
|
|
|
8
8
|
AbstractEventLoop,
|
|
9
9
|
CancelledError,
|
|
10
10
|
Event,
|
|
11
|
+
Lock,
|
|
12
|
+
SelectorEventLoop,
|
|
11
13
|
Task,
|
|
12
14
|
all_tasks,
|
|
13
15
|
get_running_loop,
|
|
14
16
|
sleep,
|
|
17
|
+
to_thread,
|
|
15
18
|
wait_for,
|
|
16
19
|
)
|
|
17
|
-
from collections.abc import Awaitable, Callable, Collection
|
|
20
|
+
from collections.abc import Awaitable, Callable, Collection, Iterator
|
|
18
21
|
from email import encoders
|
|
19
22
|
from email.header import Header
|
|
20
23
|
from email.mime.base import MIMEBase
|
|
21
24
|
from email.mime.multipart import MIMEMultipart
|
|
22
25
|
from email.mime.text import MIMEText
|
|
23
26
|
from email.utils import formatdate
|
|
24
|
-
from
|
|
27
|
+
from ipaddress import IPv4Address, IPv4Network
|
|
28
|
+
from selectors import SelectSelector
|
|
29
|
+
from socket import AF_INET
|
|
30
|
+
from typing import TypeAlias, TypeVar
|
|
25
31
|
|
|
26
32
|
import orjson
|
|
27
33
|
from aiohttp import web
|
|
28
34
|
from aiosmtplib import SMTP
|
|
35
|
+
from pyroute2.iproute.linux import IPRoute
|
|
29
36
|
|
|
30
37
|
from .config import SmtpServerConfig
|
|
31
38
|
from .exceptions import ArgumentError
|
|
32
39
|
from .types import Coro, JsonDict, JsonValue, T
|
|
33
40
|
from .utils import from_str
|
|
34
41
|
|
|
42
|
+
RT_PROTO_KERNEL: int = 2 # Indicates route was installed by kernel
|
|
43
|
+
RT_MAIN_TABLE: int = 254 # Main routing table
|
|
44
|
+
|
|
35
45
|
_SOCKET_TIMEOUT: int = 15 # In seconds
|
|
36
46
|
_J = TypeVar('_J', bound=JsonValue)
|
|
47
|
+
RouteData: TypeAlias = tuple[
|
|
48
|
+
set[tuple[IPv4Network, IPv4Address]], set[tuple[IPv4Network, IPv4Address]], IPv4Address
|
|
49
|
+
] # Connected networks, system routes, default gateway
|
|
50
|
+
_route_cache: RouteData | None = None
|
|
51
|
+
_route_lock: Lock = Lock()
|
|
37
52
|
|
|
38
53
|
|
|
39
54
|
def run_task(coro: Coro[T], name: str = '', loop: AbstractEventLoop | None = None) -> Task[T]:
|
|
@@ -198,3 +213,72 @@ async def send_email(
|
|
|
198
213
|
if server.user:
|
|
199
214
|
await smtp.login(server.user, server.pswd)
|
|
200
215
|
await smtp.send_message(msg)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
# Necessary due to pyroute2 - uvloop incompatibility
|
|
219
|
+
@contextlib.contextmanager
|
|
220
|
+
def _ip_route() -> Iterator[IPRoute]:
|
|
221
|
+
loop = SelectorEventLoop(SelectSelector())
|
|
222
|
+
try:
|
|
223
|
+
with IPRoute(use_event_loop=loop) as ipr:
|
|
224
|
+
yield ipr
|
|
225
|
+
finally:
|
|
226
|
+
loop.close()
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _get_local_ip_addresses() -> tuple[IPv4Address, ...]:
|
|
230
|
+
with _ip_route() as ipr:
|
|
231
|
+
return tuple(
|
|
232
|
+
IPv4Address(address.get_attr('IFA_ADDRESS'))
|
|
233
|
+
for address in ipr.get_addr(family=AF_INET)
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
async def get_local_ip_addresses() -> tuple[IPv4Address, ...]:
|
|
238
|
+
return await to_thread(_get_local_ip_addresses)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _get_local_ip_routes() -> RouteData:
|
|
242
|
+
default_gw: IPv4Address = IPv4Address(0)
|
|
243
|
+
system_routes: set[tuple[IPv4Network, IPv4Address]] = set()
|
|
244
|
+
connected_nets: set[tuple[IPv4Network, IPv4Address]] = set()
|
|
245
|
+
|
|
246
|
+
# Connected networks contain a tuple of connected network and IP of local interface
|
|
247
|
+
# Routes contain a tuple of routed network and gateway IP
|
|
248
|
+
|
|
249
|
+
# Always add loopback network
|
|
250
|
+
connected_nets.add((IPv4Network('127.0.0.0/8'), IPv4Address('127.0.0.1')))
|
|
251
|
+
with _ip_route() as ipr:
|
|
252
|
+
routes = ipr.get_routes(family=AF_INET, table=RT_MAIN_TABLE)
|
|
253
|
+
for route in routes:
|
|
254
|
+
gateway_value = route.get_attr('RTA_GATEWAY')
|
|
255
|
+
destination = route.get_attr('RTA_DST')
|
|
256
|
+
prefix_length = route['dst_len']
|
|
257
|
+
if gateway_value is not None:
|
|
258
|
+
gateway = IPv4Address(gateway_value)
|
|
259
|
+
if destination is None and prefix_length == 0:
|
|
260
|
+
default_gw = gateway
|
|
261
|
+
else:
|
|
262
|
+
system_routes.add(
|
|
263
|
+
(IPv4Network(f'{destination}/{prefix_length}'), gateway)
|
|
264
|
+
)
|
|
265
|
+
elif route['proto'] == RT_PROTO_KERNEL:
|
|
266
|
+
connected_nets.add(
|
|
267
|
+
(
|
|
268
|
+
IPv4Network(f'{destination}/{prefix_length}'),
|
|
269
|
+
IPv4Address(route.get_attr('RTA_PREFSRC')),
|
|
270
|
+
)
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
return connected_nets, system_routes, default_gw
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
async def get_local_ip_routes(force: bool = False) -> RouteData:
|
|
277
|
+
global _route_cache
|
|
278
|
+
async with _route_lock:
|
|
279
|
+
if not force and _route_cache:
|
|
280
|
+
return _route_cache
|
|
281
|
+
|
|
282
|
+
route_data = await to_thread(_get_local_ip_routes)
|
|
283
|
+
_route_cache = route_data
|
|
284
|
+
return route_data
|
|
@@ -8,6 +8,7 @@ import shutil
|
|
|
8
8
|
from dataclasses import dataclass, field
|
|
9
9
|
from enum import Enum, auto
|
|
10
10
|
from ipaddress import IPv4Address, IPv4Network
|
|
11
|
+
from socket import AF_INET, SOCK_STREAM, socket
|
|
11
12
|
from ssl import TLSVersion
|
|
12
13
|
from typing import Final, TypeGuard, cast
|
|
13
14
|
|
|
@@ -15,7 +16,7 @@ import pytz
|
|
|
15
16
|
import tomli
|
|
16
17
|
|
|
17
18
|
from .types import JsonDict, JsonValue, T
|
|
18
|
-
from .utils import add_anchors, get_duplicates
|
|
19
|
+
from .utils import add_anchors, get_duplicates
|
|
19
20
|
|
|
20
21
|
_HOST_RE: Final[re.Pattern[str]] = re.compile(
|
|
21
22
|
r'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])'
|
|
@@ -305,11 +306,14 @@ def check_valid_net(net: object, name: str, err_list: list[str]) -> IPv4Network
|
|
|
305
306
|
|
|
306
307
|
|
|
307
308
|
def check_valid_bind_ip(ip: object, name: str, err_list: list[str]) -> TypeGuard[str]:
|
|
308
|
-
if ip
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
309
|
+
if isinstance(ip, str):
|
|
310
|
+
try:
|
|
311
|
+
IPv4Address(ip)
|
|
312
|
+
with socket(AF_INET, SOCK_STREAM) as bind_socket:
|
|
313
|
+
bind_socket.bind((ip, 0))
|
|
312
314
|
return True
|
|
315
|
+
except (OSError, ValueError):
|
|
316
|
+
pass
|
|
313
317
|
err_list.append(f'Invalid {name} IP address or no interface found with IP address "{ip}".')
|
|
314
318
|
return False
|
|
315
319
|
|
|
@@ -44,7 +44,7 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
44
44
|
kwargs['timeout'] = ClientTimeout(total=self.timeout) # In seconds
|
|
45
45
|
if self.config.client_user:
|
|
46
46
|
kwargs['auth'] = BasicAuth(self.config.client_user, self.config.client_pswd, 'utf-8')
|
|
47
|
-
self._session = ClientSession(**kwargs)
|
|
47
|
+
self._session = ClientSession(**kwargs) # type: ignore # Compatible args
|
|
48
48
|
self._request_counter = 0
|
|
49
49
|
self._logger_trace: StructuredLogger | None = None
|
|
50
50
|
if self.logger.isEnabledFor(TRACE) and self.config.comm_log:
|
|
@@ -130,7 +130,7 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
130
130
|
'Received response', seq=seq, client=self.name, status=resp.status
|
|
131
131
|
)
|
|
132
132
|
except ClientConnectorError:
|
|
133
|
-
self.logger.
|
|
133
|
+
self.logger.error(
|
|
134
134
|
'Error while connecting to web server',
|
|
135
135
|
seq=seq,
|
|
136
136
|
client=self.name,
|
|
@@ -140,7 +140,7 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
140
140
|
)
|
|
141
141
|
raise
|
|
142
142
|
except ServerDisconnectedError:
|
|
143
|
-
self.logger.
|
|
143
|
+
self.logger.error(
|
|
144
144
|
'Web server disconnected unexpectedly',
|
|
145
145
|
seq=seq,
|
|
146
146
|
client=self.name,
|
|
@@ -150,12 +150,12 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
150
150
|
)
|
|
151
151
|
raise
|
|
152
152
|
except ClientOSError:
|
|
153
|
-
self.logger.
|
|
153
|
+
self.logger.error(
|
|
154
154
|
'HTTP transport error', seq=seq, client=self.name, method=method, url=url, json=msg
|
|
155
155
|
)
|
|
156
156
|
raise
|
|
157
157
|
except TimeoutError:
|
|
158
|
-
self.logger.
|
|
158
|
+
self.logger.error(
|
|
159
159
|
'Timeout while connecting to web server',
|
|
160
160
|
seq=seq,
|
|
161
161
|
client=self.name,
|
|
@@ -165,7 +165,7 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
165
165
|
)
|
|
166
166
|
raise
|
|
167
167
|
except ConnectionResetError:
|
|
168
|
-
self.logger.
|
|
168
|
+
self.logger.error(
|
|
169
169
|
'HTTP server connection lost',
|
|
170
170
|
seq=seq,
|
|
171
171
|
client=self.name,
|
|
@@ -193,6 +193,7 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
193
193
|
if self.init and self._status != ClientStatus.CONNECTED:
|
|
194
194
|
# Should raise exception on error
|
|
195
195
|
await self.init(self)
|
|
196
|
+
self._status = ClientStatus.CONNECTED
|
|
196
197
|
if not current_data:
|
|
197
198
|
current_data = await self.queue.get()
|
|
198
199
|
if current_data is None:
|
|
@@ -231,4 +232,4 @@ class HttpClient(Communicator[HttpRequestData | None]):
|
|
|
231
232
|
self.connect_attempted_event.clear()
|
|
232
233
|
|
|
233
234
|
def is_running(self) -> bool:
|
|
234
|
-
return self.
|
|
235
|
+
return self._status == ClientStatus.CONNECTED
|
|
@@ -683,14 +683,13 @@ class NetService(SystemService[CN], Generic[CN]):
|
|
|
683
683
|
rel_url: str = request.rel_url.human_repr()
|
|
684
684
|
clients: dict[str, ClientConfig] = self._config.clients
|
|
685
685
|
client: str = ''
|
|
686
|
-
client_conf: ClientConfig | None
|
|
686
|
+
client_conf: ClientConfig | None
|
|
687
687
|
response: web.StreamResponse | None
|
|
688
688
|
ip_str: str | None = request.headers.get('X-Real-IP') or request.remote
|
|
689
689
|
self._logger.trace(
|
|
690
690
|
'Received HTTP request', seq=seq, method=request.method, url=rel_url, ip=ip_str
|
|
691
691
|
)
|
|
692
692
|
try:
|
|
693
|
-
# Try to identify client by IP
|
|
694
693
|
try:
|
|
695
694
|
if not ip_str:
|
|
696
695
|
raise ValueError()
|
|
@@ -698,28 +697,31 @@ class NetService(SystemService[CN], Generic[CN]):
|
|
|
698
697
|
except ValueError:
|
|
699
698
|
response = web.Response(status=500, text='Could not detect client IP address')
|
|
700
699
|
return await respond('', response)
|
|
701
|
-
client, client_conf = next(
|
|
702
|
-
(
|
|
703
|
-
(clnt, clnt_conf)
|
|
704
|
-
for clnt, clnt_conf in clients.items()
|
|
705
|
-
for allowed_net in clnt_conf.allowed_ips
|
|
706
|
-
if remote_ip in allowed_net
|
|
707
|
-
),
|
|
708
|
-
('', None),
|
|
709
|
-
)
|
|
710
|
-
|
|
711
700
|
api_key: str = self._get_api_key(request)
|
|
712
|
-
|
|
713
|
-
self._logger.info(
|
|
714
|
-
'Client identified by IP sent wrong API key',
|
|
715
|
-
seq=seq,
|
|
716
|
-
method=request.method,
|
|
717
|
-
url=rel_url,
|
|
718
|
-
ip=ip_str,
|
|
719
|
-
)
|
|
720
|
-
response = web.Response(status=401)
|
|
721
|
-
return await respond(client, response)
|
|
701
|
+
possible_clients: dict[str, ClientConfig] = {}
|
|
722
702
|
if api_key:
|
|
703
|
+
# An API key selects its client directly. Reject it when the source IP
|
|
704
|
+
# already belongs to a different key, and still require the password
|
|
705
|
+
# when that client has one.
|
|
706
|
+
client, client_conf = next(
|
|
707
|
+
(
|
|
708
|
+
(clnt, clnt_conf)
|
|
709
|
+
for clnt, clnt_conf in clients.items()
|
|
710
|
+
for allowed_net in clnt_conf.allowed_ips
|
|
711
|
+
if remote_ip in allowed_net
|
|
712
|
+
),
|
|
713
|
+
('', None),
|
|
714
|
+
)
|
|
715
|
+
if client_conf and client_conf.api_key != api_key:
|
|
716
|
+
self._logger.info(
|
|
717
|
+
'Client identified by IP sent wrong API key',
|
|
718
|
+
seq=seq,
|
|
719
|
+
method=request.method,
|
|
720
|
+
url=rel_url,
|
|
721
|
+
ip=ip_str,
|
|
722
|
+
)
|
|
723
|
+
response = web.Response(status=401)
|
|
724
|
+
return await respond(client, response)
|
|
723
725
|
if request.scheme != 'https':
|
|
724
726
|
if request.headers.get(hdrs.X_FORWARDED_PROTO) != 'https':
|
|
725
727
|
self._logger.info(
|
|
@@ -738,17 +740,43 @@ class NetService(SystemService[CN], Generic[CN]):
|
|
|
738
740
|
),
|
|
739
741
|
('', None),
|
|
740
742
|
)
|
|
741
|
-
|
|
742
|
-
possible_clients: dict[str, ClientConfig] = {}
|
|
743
|
-
if client_conf:
|
|
744
|
-
if client_conf.server_user:
|
|
745
|
-
# Found client by IP and/or API key, but authentication is still required
|
|
743
|
+
if client_conf and client_conf.server_user:
|
|
746
744
|
possible_clients = {client: client_conf}
|
|
747
745
|
client = ''
|
|
746
|
+
client_conf = None
|
|
747
|
+
elif not client_conf:
|
|
748
|
+
possible_clients = {
|
|
749
|
+
clnt: clnt_def for clnt, clnt_def in clients.items() if clnt_def.server_user
|
|
750
|
+
}
|
|
748
751
|
else:
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
+
# A passwordless IP client is used only when this path is allowed for it.
|
|
753
|
+
# Otherwise fall through to basic auth instead of rejecting the request.
|
|
754
|
+
ip_clients: list[tuple[str, ClientConfig]] = [
|
|
755
|
+
(clnt, clnt_conf)
|
|
756
|
+
for clnt, clnt_conf in clients.items()
|
|
757
|
+
if any(remote_ip in allowed_net for allowed_net in clnt_conf.allowed_ips)
|
|
758
|
+
]
|
|
759
|
+
client, client_conf = next(
|
|
760
|
+
(
|
|
761
|
+
(clnt, clnt_conf)
|
|
762
|
+
for clnt, clnt_conf in ip_clients
|
|
763
|
+
if not clnt_conf.server_user
|
|
764
|
+
and not any(pattern.match(rel_url) for pattern in clnt_conf.path_deny)
|
|
765
|
+
and any(pattern.match(rel_url) for pattern in clnt_conf.path_allow)
|
|
766
|
+
),
|
|
767
|
+
('', None),
|
|
768
|
+
)
|
|
769
|
+
if not client_conf:
|
|
770
|
+
password_clients: list[tuple[str, ClientConfig]] = [
|
|
771
|
+
(clnt, clnt_conf) for clnt, clnt_conf in ip_clients if clnt_conf.server_user
|
|
772
|
+
]
|
|
773
|
+
if not password_clients:
|
|
774
|
+
password_clients = [
|
|
775
|
+
(clnt, clnt_conf)
|
|
776
|
+
for clnt, clnt_conf in clients.items()
|
|
777
|
+
if clnt_conf.server_user
|
|
778
|
+
]
|
|
779
|
+
possible_clients = dict(password_clients)
|
|
752
780
|
|
|
753
781
|
if not client_conf:
|
|
754
782
|
self._logger.trace('Performing basic authentication', seq=seq)
|
|
@@ -2,29 +2,19 @@ import re
|
|
|
2
2
|
from collections import defaultdict
|
|
3
3
|
from collections.abc import Callable, Iterator
|
|
4
4
|
from datetime import date, datetime, timedelta
|
|
5
|
-
from ipaddress import IPv4Address
|
|
6
|
-
from socket import AF_INET
|
|
5
|
+
from ipaddress import IPv4Address
|
|
6
|
+
from socket import AF_INET, SOCK_DGRAM, socket
|
|
7
7
|
from subprocess import CalledProcessError, CompletedProcess, run
|
|
8
|
-
from typing import Generic
|
|
8
|
+
from typing import Generic
|
|
9
9
|
from xml.etree.ElementTree import Element, ParseError
|
|
10
10
|
from xml.etree.ElementTree import parse as xmlparse
|
|
11
11
|
from xml.etree.ElementTree import tostring as xmltostring
|
|
12
12
|
|
|
13
|
-
from pyroute2 import NDB
|
|
14
|
-
from pyroute2.ndb.view import View
|
|
15
|
-
|
|
16
13
|
from .exceptions import InternalError
|
|
17
14
|
from .types import JsonValue, T
|
|
18
15
|
|
|
19
|
-
RT_PROTO_KERNEL: int = 2 # Indicates route was installed by kernel
|
|
20
|
-
RT_MAIN_TABLE: int = 254 # Main routing table
|
|
21
|
-
|
|
22
16
|
E164_RE: re.Pattern[str] = re.compile(r'^[+][1-9][0-9]{1,17}$')
|
|
23
17
|
PHONE_RE: re.Pattern[str] = re.compile(r'^[0-9]{1,30}$') # Allow for international prefixes
|
|
24
|
-
RouteData: TypeAlias = tuple[
|
|
25
|
-
set[tuple[IPv4Network, IPv4Address]], set[tuple[IPv4Network, IPv4Address]], IPv4Address
|
|
26
|
-
] # Connected networks, system routes, default gateway
|
|
27
|
-
_route_cache: RouteData | None = None
|
|
28
18
|
|
|
29
19
|
|
|
30
20
|
class PeekableGenerator(Generic[T]):
|
|
@@ -148,7 +138,7 @@ def from_str(value: str | None, converter: Callable[..., T] | type[T]) -> T | No
|
|
|
148
138
|
if converter is datetime:
|
|
149
139
|
return timeout_to_timestamp(value) # type:ignore # return value must be correct
|
|
150
140
|
if isinstance(converter, type):
|
|
151
|
-
return converter(value) # int, float
|
|
141
|
+
return converter(value) # type:ignore # int, float
|
|
152
142
|
if callable(converter):
|
|
153
143
|
return converter(value)
|
|
154
144
|
raise InternalError(f'Unknown converter {converter!r} for value "{value}"')
|
|
@@ -159,63 +149,6 @@ def load_file(filename: str) -> str:
|
|
|
159
149
|
return file.read()
|
|
160
150
|
|
|
161
151
|
|
|
162
|
-
def get_local_ip_addresses() -> tuple[IPv4Address, ...]:
|
|
163
|
-
ndb: NDB = NDB()
|
|
164
|
-
addresses: View = ndb.addresses # type:ignore # dynamic member
|
|
165
|
-
return tuple(IPv4Address(addr.address) for addr in addresses.dump().filter(family=AF_INET))
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
def get_local_ip_routes(force: bool = False) -> RouteData:
|
|
169
|
-
global _route_cache
|
|
170
|
-
if not force and _route_cache:
|
|
171
|
-
return _route_cache
|
|
172
|
-
|
|
173
|
-
ndb: NDB = NDB()
|
|
174
|
-
default_gw: IPv4Address = IPv4Address(0)
|
|
175
|
-
system_routes: set[tuple[IPv4Network, IPv4Address]] = set()
|
|
176
|
-
connected_nets: set[tuple[IPv4Network, IPv4Address]] = set()
|
|
177
|
-
|
|
178
|
-
# Connected networks contain a tuple of connected network and IP of local interface
|
|
179
|
-
# Routes contain a tuple of routed network and gateway IP
|
|
180
|
-
|
|
181
|
-
# Always add loopback network
|
|
182
|
-
connected_nets.add((IPv4Network('127.0.0.0/8'), IPv4Address('127.0.0.1')))
|
|
183
|
-
routes: View = ndb.routes # type:ignore # dynamic member
|
|
184
|
-
for route in routes.dump().filter(family=AF_INET, table=RT_MAIN_TABLE):
|
|
185
|
-
if route.gateway is not None:
|
|
186
|
-
gateway = IPv4Address(route.gateway)
|
|
187
|
-
if route.dst == '' and route.dst_len == 0:
|
|
188
|
-
default_gw = gateway
|
|
189
|
-
else:
|
|
190
|
-
system_routes.add((IPv4Network(route.dst + '/' + str(route.dst_len)), gateway))
|
|
191
|
-
elif route.proto == RT_PROTO_KERNEL:
|
|
192
|
-
connected_nets.add(
|
|
193
|
-
(IPv4Network(route.dst + '/' + str(route.dst_len)), IPv4Address(route.prefsrc))
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
route_data: RouteData = (connected_nets, system_routes, default_gw)
|
|
197
|
-
_route_cache = route_data
|
|
198
|
-
return route_data
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
def resolve_local_ip(remote_ip: IPv4Address) -> IPv4Address:
|
|
202
|
-
connected_nets, routes, default_gw = get_local_ip_routes()
|
|
203
|
-
|
|
204
|
-
local_ip: IPv4Address | None = next(
|
|
205
|
-
(net[1] for net in connected_nets if remote_ip in net[0]), None
|
|
206
|
-
)
|
|
207
|
-
if not local_ip:
|
|
208
|
-
gateway: IPv4Address | None = next((net[1] for net in routes if remote_ip in net[0]), None)
|
|
209
|
-
if not gateway:
|
|
210
|
-
gateway = default_gw
|
|
211
|
-
if gateway:
|
|
212
|
-
local_ip = next((net[1] for net in connected_nets if gateway in net[0]), None)
|
|
213
|
-
if not local_ip:
|
|
214
|
-
local_ip = IPv4Address('0.0.0.0')
|
|
215
|
-
|
|
216
|
-
return local_ip
|
|
217
|
-
|
|
218
|
-
|
|
219
152
|
def get_duplicates(item_list: list[T]) -> set[T]:
|
|
220
153
|
seen: set[T] = set()
|
|
221
154
|
dupes: set[T] = set()
|
|
@@ -518,3 +451,12 @@ def timeout_to_timestamp(timeout: JsonValue) -> datetime | None:
|
|
|
518
451
|
if milliseconds is None:
|
|
519
452
|
return None
|
|
520
453
|
return datetime.now() + timedelta(milliseconds=milliseconds)
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
def resolve_local_ip(remote_ip: IPv4Address) -> IPv4Address:
|
|
457
|
+
try:
|
|
458
|
+
with socket(AF_INET, SOCK_DGRAM) as sock:
|
|
459
|
+
sock.connect((str(remote_ip), 9))
|
|
460
|
+
return IPv4Address(sock.getsockname()[0])
|
|
461
|
+
except OSError:
|
|
462
|
+
return IPv4Address('0.0.0.0')
|
|
@@ -847,14 +847,14 @@ wheels = [
|
|
|
847
847
|
|
|
848
848
|
[[package]]
|
|
849
849
|
name = "pyroute2"
|
|
850
|
-
version = "0.
|
|
850
|
+
version = "0.9.6"
|
|
851
851
|
source = { registry = "https://pypi.org/simple" }
|
|
852
852
|
dependencies = [
|
|
853
853
|
{ name = "win-inet-pton", marker = "sys_platform == 'win32'" },
|
|
854
854
|
]
|
|
855
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
855
|
+
sdist = { url = "https://files.pythonhosted.org/packages/9b/3c/cae3aa8a07522d4fd625958f690ab6eb4ffbd9c94e30e2995f585fded630/pyroute2-0.9.6.tar.gz", hash = "sha256:6bc5e2ea9a372ded682b4ede4028ba00236bd6e35b42d833f39a96b219ef1db2", size = 478486, upload-time = "2026-04-15T18:26:07.408Z" }
|
|
856
856
|
wheels = [
|
|
857
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
857
|
+
{ url = "https://files.pythonhosted.org/packages/14/f5/77292e847cb2bcd94f0e7be214ad09972de5db6a6914e47117293ed0f4a8/pyroute2-0.9.6-py3-none-any.whl", hash = "sha256:3334091326e560a506635449af03b26920d22d4e5a7996aed354363d106fcef8", size = 483440, upload-time = "2026-04-15T18:26:03.14Z" },
|
|
858
858
|
]
|
|
859
859
|
|
|
860
860
|
[[package]]
|
|
@@ -906,27 +906,27 @@ wheels = [
|
|
|
906
906
|
|
|
907
907
|
[[package]]
|
|
908
908
|
name = "ruff"
|
|
909
|
-
version = "0.
|
|
909
|
+
version = "0.16.5"
|
|
910
910
|
source = { registry = "https://pypi.org/simple" }
|
|
911
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
911
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f3/85/c8e12473c93018f92d19dd988a294202e1c27426c47ec4de53ffb847b8d8/ruff-0.16.5.tar.gz", hash = "sha256:1b88500f9ffbcab3dedb0082c9f9492e91ec3d618aac1236a3e0189938f7040b", size = 4912003, upload-time = "2026-08-27T16:34:18.258Z" }
|
|
912
912
|
wheels = [
|
|
913
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
914
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
915
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
916
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
917
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
918
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
919
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
920
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
921
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
922
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
923
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
924
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
925
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
926
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
927
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
928
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
929
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
913
|
+
{ url = "https://files.pythonhosted.org/packages/c6/b6/77c90a970fe2dae17a723acbd011043ea97c98d7deacccefdc4ba74ec512/ruff-0.16.5-py3-none-linux_armv6l.whl", hash = "sha256:12e5f673e774c35fbb62f288809c7653b73445f8ecec6b6063fd6ea3521aa14b", size = 10011941, upload-time = "2026-08-27T16:33:41.287Z" },
|
|
914
|
+
{ url = "https://files.pythonhosted.org/packages/4b/46/6cf67cf6411885a1d6f7f6d801682f155536a85176d10b605e2ceffed8bd/ruff-0.16.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:eda58a5802de40e7ed5b32b64e0b32539338cc6fcd2c78f61e3ad6a0d79f51c3", size = 10204049, upload-time = "2026-08-27T16:33:44.056Z" },
|
|
915
|
+
{ url = "https://files.pythonhosted.org/packages/46/fd/c8720ca7a090abf0c2fef4abe8a5ef6e5127ed15196d8886ff75a2b370e2/ruff-0.16.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5ae9a7b9a8875131f40f8fe967cc86abf899779efd663cb7ce3d572d01da7eb", size = 9809037, upload-time = "2026-08-27T16:33:46.257Z" },
|
|
916
|
+
{ url = "https://files.pythonhosted.org/packages/43/45/a684caacdedaca180f52bacccc40bf0789d2c5a7c75f25324853e9eaedb5/ruff-0.16.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b719b0a1f4d59710d283ab2965f621684a108a9e41da622e3b23f0326cd0025", size = 9964129, upload-time = "2026-08-27T16:33:48.352Z" },
|
|
917
|
+
{ url = "https://files.pythonhosted.org/packages/9e/f2/5d2bcdaca6b5b93d1b4dfc166cd2aebf7680143a1b38a28759df13a94d31/ruff-0.16.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2298f2780ed1be0c5cb1361e32ab7b1467f3cce7dabe101d2210a314f2fe42e9", size = 9821518, upload-time = "2026-08-27T16:33:50.57Z" },
|
|
918
|
+
{ url = "https://files.pythonhosted.org/packages/aa/ff/011cce29accf9257d5974145b733fc653a37985ed6825413a3987cefbfe0/ruff-0.16.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:258f29035a2dd021e7861e631b227a5b3f14e50c1184c9a6a122c5f4576154d7", size = 10534835, upload-time = "2026-08-27T16:33:52.522Z" },
|
|
919
|
+
{ url = "https://files.pythonhosted.org/packages/d7/5a/f0cf109bada9bba0e96c90c21c9f9251803f57225c32d293327a03c710d6/ruff-0.16.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b9a4f0432966834019c74d1b7e5c51224305d7713f3d7faf3e7451f1a3be3cde", size = 11252550, upload-time = "2026-08-27T16:33:54.521Z" },
|
|
920
|
+
{ url = "https://files.pythonhosted.org/packages/63/4d/1d481aaea2046c6a7ed7c291f9004c669cce3c087b6b376ed5b08271e3fe/ruff-0.16.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b5eb3a8c3d0ade9cea42b591fd530368e8798380e30e0a308b85a5cf718f09ea", size = 10777949, upload-time = "2026-08-27T16:33:56.88Z" },
|
|
921
|
+
{ url = "https://files.pythonhosted.org/packages/ee/34/ee245ca55f64443233034b3d02b03236b19242004281247c079390b7facd/ruff-0.16.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef0f69e191a13a3c9816f63163c88790cb12cd157bbbb384e9c44745702ab105", size = 10311656, upload-time = "2026-08-27T16:33:59.12Z" },
|
|
922
|
+
{ url = "https://files.pythonhosted.org/packages/a7/4d/c33a333e341c0a2b96c715b52d89a606f5a34cd4ac493cd9b8d0187186b8/ruff-0.16.5-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:0eeab41fbea2c42f98dfb9822cdccda9d24ba38d49f6dc945b5c236d48f0ef29", size = 10532125, upload-time = "2026-08-27T16:34:01.166Z" },
|
|
923
|
+
{ url = "https://files.pythonhosted.org/packages/30/e1/a64cef78b40192497bb98a27a8aa8f2c98ee9ee15bc97f7712d94ef32937/ruff-0.16.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f0768e9df4300713fff30733c87575f68b6f1d8de41184e505b7fdd9c0c95eaf", size = 10097648, upload-time = "2026-08-27T16:34:03.16Z" },
|
|
924
|
+
{ url = "https://files.pythonhosted.org/packages/cc/4e/4cdc9ed3c3e109d2f71e62572a37457298d7bc7501ec3138babb7ed32bbd/ruff-0.16.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:95cc70cdc7aa80c338de356279d2adbeb2de0f520b9ecd8aba75b94e95e02f91", size = 9829344, upload-time = "2026-08-27T16:34:05.134Z" },
|
|
925
|
+
{ url = "https://files.pythonhosted.org/packages/39/4a/31ed35ce31729955fc583ee0d176d6e784c1290cb0b0a75cb2134c1ab72a/ruff-0.16.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d185c8398ded1bfd91c0c2cb258346307571eccc473a8490af8c3977399c384a", size = 10277117, upload-time = "2026-08-27T16:34:07.425Z" },
|
|
926
|
+
{ url = "https://files.pythonhosted.org/packages/a8/a0/60356d86687b4b666d593df213f4dc3041750d024cb7bf2cfa81cfd65c2e/ruff-0.16.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:fb8e3a3c4c6a784150a7ced53b015f4b253fc2bf97a610886419ead64b4756ef", size = 10711653, upload-time = "2026-08-27T16:34:09.712Z" },
|
|
927
|
+
{ url = "https://files.pythonhosted.org/packages/ed/20/656d67f5b25ca9bda4e02b1de25867b2954e1d19e03648060f167ad0f4cc/ruff-0.16.5-py3-none-win32.whl", hash = "sha256:288b0a5f080492fe5635db849f9e2e84aa3cce7b7f0e955997d416c507c76a26", size = 10034250, upload-time = "2026-08-27T16:34:11.8Z" },
|
|
928
|
+
{ url = "https://files.pythonhosted.org/packages/5b/42/ee8e68a207b9127fcde6c3d7e197def432f346cb1af159e1fa14ca0d1cdc/ruff-0.16.5-py3-none-win_amd64.whl", hash = "sha256:ddc6385fb2137f616357ca03d6c74f4be987f80fed4008566b754f6032b8546f", size = 10516714, upload-time = "2026-08-27T16:34:13.963Z" },
|
|
929
|
+
{ url = "https://files.pythonhosted.org/packages/73/e3/7df5a396e445b9ba49ce9a9437439a4d80042c61c0ade199abf8d16de1ac/ruff-0.16.5-py3-none-win_arm64.whl", hash = "sha256:a64abe90968719b851bb7cedffaa8753fbdbdadab483089682db623f3edc587e", size = 10391564, upload-time = "2026-08-27T16:34:16.064Z" },
|
|
930
930
|
]
|
|
931
931
|
|
|
932
932
|
[[package]]
|
|
@@ -1032,7 +1032,7 @@ wheels = [
|
|
|
1032
1032
|
|
|
1033
1033
|
[[package]]
|
|
1034
1034
|
name = "voxutils"
|
|
1035
|
-
version = "0.7.
|
|
1035
|
+
version = "0.7.4"
|
|
1036
1036
|
source = { editable = "." }
|
|
1037
1037
|
dependencies = [
|
|
1038
1038
|
{ name = "aiodns" },
|
|
@@ -1065,7 +1065,7 @@ requires-dist = [
|
|
|
1065
1065
|
{ name = "aiosmtplib", specifier = ">=5.1.0" },
|
|
1066
1066
|
{ name = "asyncpg", specifier = ">=0.31.0" },
|
|
1067
1067
|
{ name = "orjson", specifier = ">=3.11.7" },
|
|
1068
|
-
{ name = "pyroute2", specifier = "==0.
|
|
1068
|
+
{ name = "pyroute2", specifier = "==0.9.6" },
|
|
1069
1069
|
{ name = "python-magic", specifier = ">=0.4.27" },
|
|
1070
1070
|
{ name = "pytz", specifier = ">=2025.2" },
|
|
1071
1071
|
{ name = "tomli", specifier = ">=2.4.0" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|