gns3-server: update to 2.2.35.

This commit is contained in:
Tim Sandquist 2022-11-08 19:00:23 -06:00 committed by classabbyamp
parent 0561d4588c
commit 63b033b212
2 changed files with 68 additions and 3 deletions

View File

@ -0,0 +1,65 @@
diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py
index 5c5236b9..971e3452 100644
--- a/gns3server/controller/__init__.py
+++ b/gns3server/controller/__init__.py
@@ -22,7 +22,11 @@ import uuid
import socket
import shutil
import aiohttp
-import importlib_resources
+
+try:
+ from importlib import resources as importlib_resources
+except ImportError:
+ import importlib_resources
from ..config import Config
from .project import Project
diff --git a/gns3server/controller/appliance_manager.py b/gns3server/controller/appliance_manager.py
index d15fc69b..41b73104 100644
--- a/gns3server/controller/appliance_manager.py
+++ b/gns3server/controller/appliance_manager.py
@@ -21,9 +21,13 @@ import json
import uuid
import asyncio
import aiohttp
-import importlib_resources
import shutil
+try:
+ from importlib import resources as importlib_resources
+except ImportError:
+ import importlib_resources
+
from .appliance import Appliance
from ..config import Config
from ..utils.asyncio import locking
diff --git a/gns3server/utils/get_resource.py b/gns3server/utils/get_resource.py
index b4b599bd..f4054cd3 100644
--- a/gns3server/utils/get_resource.py
+++ b/gns3server/utils/get_resource.py
@@ -19,7 +19,11 @@ import atexit
import logging
import os
import sys
-import importlib_resources
+
+try:
+ from importlib import resources as importlib_resources
+except ImportError:
+ import importlib_resources
from contextlib import ExitStack
resource_manager = ExitStack()
diff --git a/requirements.txt b/requirements.txt
index 53f1200d..5eda661b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,6 +11,6 @@ psutil==5.9.2
async-timeout>=4.0.2,<4.1
distro>=1.7.0
py-cpuinfo>=9.0.0,<10.0
-importlib-resources>=1.3
+importlib-resources>=1.3; python_version < '3.9'
setuptools>=60.8.1; python_version >= '3.7'
setuptools==59.6.0; python_version < '3.7' # v59.6.0 is the last version to support Python 3.6

View File

@ -1,7 +1,7 @@
# Template file for 'gns3-server' # Template file for 'gns3-server'
pkgname=gns3-server pkgname=gns3-server
version=2.2.34 version=2.2.35
revision=2 revision=1
build_style=python3-module build_style=python3-module
hostmakedepends="python3-setuptools" hostmakedepends="python3-setuptools"
depends="python3-setuptools python3-jsonschema python3-aiohttp python3-aiohttp-cors depends="python3-setuptools python3-jsonschema python3-aiohttp python3-aiohttp-cors
@ -14,7 +14,7 @@ license="GPL-3.0-or-later"
homepage="https://gns3.com" homepage="https://gns3.com"
changelog="https://raw.githubusercontent.com/GNS3/gns3-server/master/CHANGELOG" changelog="https://raw.githubusercontent.com/GNS3/gns3-server/master/CHANGELOG"
distfiles="https://github.com/GNS3/gns3-server/archive/v${version}.tar.gz" distfiles="https://github.com/GNS3/gns3-server/archive/v${version}.tar.gz"
checksum=8bd61a0777df7cf195b2670ab81139f3029d9b33cf329cfa612d2b2ea3def947 checksum=2c20ddc968a24fd8a77c272071d35304bac0706266a3f9e643658555e634c489
# The source archive contains statically linked artifacts for x86_64 # The source archive contains statically linked artifacts for x86_64
# glibc, since this is the only architecture supported by upstream, we # glibc, since this is the only architecture supported by upstream, we