mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 08:44:52 +02:00
Only use importlib_resources for Python < 3.9. Fixes #2147
This commit is contained in:
parent
076e85ddb3
commit
c56a8ef8f7
@ -22,7 +22,11 @@ import uuid
|
||||
import socket
|
||||
import shutil
|
||||
import aiohttp
|
||||
import importlib_resources
|
||||
|
||||
try:
|
||||
import importlib_resources
|
||||
except ImportError:
|
||||
from importlib import resources as importlib_resources
|
||||
|
||||
from ..config import Config
|
||||
from .project import Project
|
||||
|
@ -21,9 +21,14 @@ import json
|
||||
import uuid
|
||||
import asyncio
|
||||
import aiohttp
|
||||
import importlib_resources
|
||||
import shutil
|
||||
|
||||
try:
|
||||
import importlib_resources
|
||||
except ImportError:
|
||||
from importlib import resources as importlib_resources
|
||||
|
||||
|
||||
from .appliance import Appliance
|
||||
from ..config import Config
|
||||
from ..utils.asyncio import locking
|
||||
|
@ -19,7 +19,12 @@ import atexit
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import importlib_resources
|
||||
|
||||
try:
|
||||
import importlib_resources
|
||||
except ImportError:
|
||||
from importlib import resources as importlib_resources
|
||||
|
||||
|
||||
from contextlib import ExitStack
|
||||
resource_manager = ExitStack()
|
||||
|
@ -11,6 +11,6 @@ psutil==5.9.4
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user