|
@@ -3,17 +3,18 @@ import importlib
|
|
|
import importlib.util
|
|
import importlib.util
|
|
|
import os
|
|
import os
|
|
|
import platform
|
|
import platform
|
|
|
-import requests
|
|
|
|
|
import sys
|
|
import sys
|
|
|
import warnings
|
|
import warnings
|
|
|
from urllib.parse import urlencode, urlsplit
|
|
from urllib.parse import urlencode, urlsplit
|
|
|
|
|
|
|
|
import django
|
|
import django
|
|
|
|
|
+import requests
|
|
|
from django.contrib.messages import constants as messages
|
|
from django.contrib.messages import constants as messages
|
|
|
from django.core.exceptions import ImproperlyConfigured, ValidationError
|
|
from django.core.exceptions import ImproperlyConfigured, ValidationError
|
|
|
from django.core.validators import URLValidator
|
|
from django.core.validators import URLValidator
|
|
|
from django.utils.encoding import force_str
|
|
from django.utils.encoding import force_str
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
+
|
|
|
try:
|
|
try:
|
|
|
import sentry_sdk
|
|
import sentry_sdk
|
|
|
except ModuleNotFoundError:
|
|
except ModuleNotFoundError:
|
|
@@ -37,9 +38,9 @@ HOSTNAME = platform.node()
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
# Validate Python version
|
|
# Validate Python version
|
|
|
-if sys.version_info < (3, 8):
|
|
|
|
|
|
|
+if sys.version_info < (3, 10):
|
|
|
raise RuntimeError(
|
|
raise RuntimeError(
|
|
|
- f"NetBox requires Python 3.8 or later. (Currently installed: Python {platform.python_version()})"
|
|
|
|
|
|
|
+ f"NetBox requires Python 3.10 or later. (Currently installed: Python {platform.python_version()})"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
#
|
|
#
|