From d4a9a21af939a1ce29a598ffa2493dfab206bb6f Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 28 Dec 2024 18:21:18 +0700 Subject: [PATCH] Upgrade dependencies --- gns3server/controller/compute.py | 9 +++++++-- requirements.txt | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index bfa00e44..aabdd5af 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -18,14 +18,19 @@ import ipaddress import aiohttp import asyncio -import async_timeout import socket import json import sys import io + from fastapi import HTTPException from aiohttp import web +if sys.version_info >= (3, 11): + from asyncio import timeout as asynctimeout +else: + from async_timeout import timeout as asynctimeout + from ..utils import parse_version from ..utils.asyncio import locking from ..controller.controller_error import ( @@ -503,7 +508,7 @@ class Compute: return self._getUrl(path) async def _run_http_query(self, method, path, data=None, timeout=120, raw=False): - async with async_timeout.timeout(delay=timeout): + async with asynctimeout(delay=timeout): url = self._getUrl(path) headers = {"content-type": "application/json"} chunked = None diff --git a/requirements.txt b/requirements.txt index 75541539..bace8510 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,23 @@ -uvicorn==0.32.0 -pydantic==2.9.2 -fastapi==0.115.5 -python-multipart==0.0.16 -websockets==13.1 +uvicorn==0.34.0 +pydantic==2.10.4 +fastapi==0.115.6 +python-multipart==0.0.20 +websockets==14.1 aiohttp>=3.10.10,<3.11 -async-timeout==4.0.3 +async-timeout==5.0.1; python_version < '3.11' aiofiles>=24.1.0,<25.0 -Jinja2>=3.1.4,<3.2 -sentry-sdk>=2.17,<2.18 # optional dependency -psutil>=6.1.0 +Jinja2>=3.1.5,<3.2 +sentry-sdk>=2.19.2,<2.20 # optional dependency +psutil>=6.1.1 distro>=1.9.0 py-cpuinfo>=9.0.0,<10.0 sqlalchemy==2.0.36 aiosqlite==0.20.0 -alembic==1.13.3 -bcrypt==4.2.0 +alembic==1.14.0 +bcrypt==4.2.1 python-jose[cryptography]==3.3.0 email-validator==2.2.0 -watchfiles==0.24.0 +watchfiles==1.0.3 zstandard==0.23.0 platformdirs>=2.4.0,<3 # platformdirs >=3 conflicts when building Debian packages importlib-resources>=1.3; python_version <= '3.9'