mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-22 05:55:14 +02:00
Revert "Update dependencies"
This commit is contained in:
1 parent
368d1af3d5
commit
c07e662d00
7 files changed
+23
-28
No files matched your search
@@ -1,10 +1,10 @@
|
||||
pytest==9.2.0
|
||||
pytest==9.1.1
|
||||
pytest-timeout==2.4.0
|
||||
pytest-asyncio==1.4.1
|
||||
pytest-asyncio==1.4.0
|
||||
httpx==0.28.1
|
||||
httpx_ws==0.9.0
|
||||
httpx_ws==0.7.2 # upgrading leads to failures in tests
|
||||
pytest-random-order==1.2.0 # opt-in: --random-order --random-order-bucket=global (legacy suites are not shuffle-clean yet, see .claude/skills/gns3-api-test-writing)
|
||||
pytest-cov==7.1.0
|
||||
ruff==0.17.3
|
||||
mypy==2.4.1
|
||||
ruff==0.16.9
|
||||
mypy==2.4.0
|
||||
rust-just==1.59.0 # provides the `just` command runner, see justfile
|
||||
@@ -21,7 +21,6 @@ API routes for symbols.
|
||||
|
||||
import logging
|
||||
import os
|
||||
from os.path import commonpath
|
||||
from typing import Dict, List
|
||||
|
||||
from fastapi import APIRouter, Depends, Request, Response, status
|
||||
@@ -171,7 +170,7 @@ async def delete_symbol(symbol_id: str) -> None:
|
||||
|
||||
# Check if it's a built-in symbol (in resource directory)
|
||||
symbols_resource_dir = get_resource("symbols")
|
||||
if symbols_resource_dir and commonpath([symbols_resource_dir, symbol_path]) == symbols_resource_dir:
|
||||
if symbols_resource_dir and os.path.commonprefix([symbols_resource_dir, symbol_path]) == symbols_resource_dir:
|
||||
raise ControllerForbiddenError("Cannot delete built-in symbols")
|
||||
|
||||
# Delete the file
|
||||
|
||||
@@ -28,7 +28,6 @@ import aiofiles
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from os.path import commonpath
|
||||
from typing import Type
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
@@ -481,7 +480,7 @@ class BaseManager:
|
||||
path = force_unix_path(path)
|
||||
for directory in valid_directory_prefices:
|
||||
log.debug(f"Searching for image '{orig_path}' in '{directory}'")
|
||||
if commonpath([directory, path]) == directory:
|
||||
if os.path.commonprefix([directory, path]) == directory:
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
raise ImageMissingError(orig_path)
|
||||
@@ -526,7 +525,7 @@ class BaseManager:
|
||||
valid_directory_prefices.append(extra_dir)
|
||||
|
||||
for directory in valid_directory_prefices:
|
||||
if commonpath([directory, path]) == directory:
|
||||
if os.path.commonprefix([directory, path]) == directory:
|
||||
relpath = os.path.relpath(path, directory)
|
||||
# We don't allow to recurse search from the top image directory just for image type directory (compatibility with old releases)
|
||||
if os.sep not in relpath or directory == img_directory:
|
||||
@@ -558,7 +557,7 @@ class BaseManager:
|
||||
|
||||
directory = self.get_images_directory()
|
||||
path = os.path.abspath(os.path.join(directory, *os.path.split(filename)))
|
||||
if commonpath([directory, path]) != directory:
|
||||
if os.path.commonprefix([directory, path]) != directory:
|
||||
raise ComputeForbiddenError(f"Could not write image: {filename}, '{path}' is forbidden")
|
||||
log.info(f"Writing image file to '{path}'")
|
||||
try:
|
||||
|
||||
@@ -22,7 +22,6 @@ import logging
|
||||
import os
|
||||
import re
|
||||
import uuid
|
||||
from os.path import commonpath
|
||||
|
||||
from ..config import Config
|
||||
from ..utils import int_to_macaddress, macaddress_to_int
|
||||
@@ -421,7 +420,7 @@ class Node:
|
||||
try:
|
||||
if not val.startswith(":") and os.path.isabs(val):
|
||||
default_symbol_directory = Config.instance().settings.Server.symbols_path
|
||||
if commonpath([default_symbol_directory, val]) != default_symbol_directory:
|
||||
if os.path.commonprefix([default_symbol_directory, val]) != default_symbol_directory:
|
||||
val = os.path.basename(val)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
@@ -38,7 +38,6 @@ except ImportError:
|
||||
|
||||
import logging
|
||||
from io import DEFAULT_BUFFER_SIZE
|
||||
from os.path import commonpath
|
||||
from typing import AsyncGenerator, List
|
||||
|
||||
import gns3server.db.models as models
|
||||
@@ -74,7 +73,7 @@ async def list_images(image_type):
|
||||
# the reason is in the default directory manage file organization and
|
||||
# it should be flatten to keep things simple
|
||||
recurse = True
|
||||
if commonpath([directory, general_images_directory]) == general_images_directory:
|
||||
if os.path.commonprefix([directory, general_images_directory]) == general_images_directory:
|
||||
recurse = False
|
||||
|
||||
directory = os.path.normpath(directory)
|
||||
@@ -89,7 +88,7 @@ async def list_images(image_type):
|
||||
files.add(filename)
|
||||
|
||||
# It the image is located in the standard directory the path is relative
|
||||
if commonpath([root, default_directory]) != default_directory:
|
||||
if os.path.commonprefix([root, default_directory]) != default_directory:
|
||||
path = os.path.join(root, filename)
|
||||
else:
|
||||
path = os.path.relpath(os.path.join(root, filename), default_directory)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
from os.path import commonpath
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
@@ -59,7 +58,7 @@ def check_path_allowed(path: str):
|
||||
"""
|
||||
|
||||
project_directory = get_default_project_directory()
|
||||
if len(commonpath([project_directory, path])) == len(project_directory):
|
||||
if len(os.path.commonprefix([project_directory, path])) == len(project_directory):
|
||||
return
|
||||
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=f"The path {path} is not allowed")
|
||||
|
||||
+10
-10
@@ -1,26 +1,26 @@
|
||||
# GNS3 Server Core Dependencies
|
||||
uvicorn==0.54.0
|
||||
pydantic==2.14.2
|
||||
fastapi==0.162.0
|
||||
pydantic==2.13.5
|
||||
fastapi==0.142.4
|
||||
python-multipart==0.0.32
|
||||
websockets==16.1.1 # google-genai 2.10.0 has requirement websockets<17.0
|
||||
aiohttp>=3.14.5,<3.15
|
||||
aiohttp>=3.14.4,<3.15
|
||||
aiofiles>=25.1.0,<26.0
|
||||
Jinja2>=3.1.6,<3.2
|
||||
sentry-sdk>=2.73.0,<3 # optional dependency
|
||||
sentry-sdk>=2.72.0,<3 # optional dependency
|
||||
psutil>=7.2.2
|
||||
distro>=1.9.0
|
||||
py-cpuinfo>=9.0.0,<10.0
|
||||
sqlalchemy[asyncio]==2.1.6
|
||||
sqlalchemy[asyncio]==2.1.4
|
||||
aiosqlite==0.22.1
|
||||
alembic==1.20.1
|
||||
alembic==1.20
|
||||
bcrypt==5.0.0
|
||||
joserfc==1.7.7
|
||||
joserfc==1.7.5
|
||||
email-validator==2.3.0
|
||||
watchdog==7.0.0
|
||||
watchdog==6.0.0
|
||||
zstandard==0.25.0
|
||||
platformdirs>=4.14.0 # fastmcp-slim >=3.4 requires >=4.0.0; upper bound removed for compatibility
|
||||
truststore>=0.10.5
|
||||
platformdirs>=2.4.0 # fastmcp-slim >=3.4 requires >=4.0.0; upper bound removed for compatibility
|
||||
truststore>=0.10.4
|
||||
|
||||
# Shared dependencies (also used by AI Copilot)
|
||||
telnetlib3==5.0.1,<6
|
||||
|
||||
Reference in new issue
Block a user