diff --git a/CHANGELOG b/CHANGELOG index f92a40ca2..4f8dccbf1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,16 @@ # Change Log +## 2.2.47 15/05/2024 + +* Remove maximum size for capture dialog. Ref #3576 +* Change sentry-sdk version +* Upgrade aiohttp, sentry-sdk and truststore +* Upgrade jsonschema and aiohttp +* Drop Python 3.7 +* Remove dev requirements for Python 3.6 +* Add NAT symbols +* Only show log message if event has "message" + ## 2.2.46 26/02/2024 * Add GNS3 console command "env" to show what environment variables are used. Ref https://github.com/GNS3/gns3-server/issues/2306 diff --git a/Dockerfile b/Dockerfile index 1cf810aaf..c9c4154d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ # Run tests inside a container -FROM ubuntu:18.04 +FROM ubuntu:latest MAINTAINER GNS3 Team RUN apt-get update -RUN apt-get install -y --force-yes python3.6 python3-pyqt5 python3-pip python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets python3.6-dev xvfb +RUN apt-get install -y --force-yes python3 python3-pyqt5 python3-pip python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets python3-dev xvfb RUN apt-get clean ADD dev-requirements.txt /dev-requirements.txt ADD requirements.txt /requirements.txt -RUN pip3 install --no-cache-dir -r /dev-requirements.txt +RUN python3 -m pip install --break-system-packages --no-cache-dir -r /dev-requirements.txt ADD . /src WORKDIR /src -CMD xvfb-run python3.6 -m pytest -vv +CMD xvfb-run python3 -m pytest -vv diff --git a/dev-requirements.txt b/dev-requirements.txt index 803bac0c9..bcd8c1128 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,5 @@ -rrequirements.txt -pytest==7.2.0; python_version >= '3.7' -pytest==7.0.1; python_version < '3.7' # v7.0.1 is the last version to support Python 3.6 +pytest==7.2.0 flake8==5.0.4 pytest-timeout==2.1.0 diff --git a/gns3/controller.py b/gns3/controller.py index a70557c44..5ea402ce3 100644 --- a/gns3/controller.py +++ b/gns3/controller.py @@ -489,11 +489,11 @@ def _event_received(self, result, *args, **kwargs): project = Topology.instance().project() if project and project.id() == result["event"]["project_id"]: project.projectUpdatedCallback(result["event"]) - elif result["action"] == "log.error": - log.error(result["event"]["message"]) - elif result["action"] == "log.warning": - log.warning(result["event"]["message"]) - elif result["action"] == "log.info": - log.info(result["event"]["message"], extra={"show": True}) + elif result["action"] == "log.error" and result["event"].get("message"): + log.error(result["event"].get("message")) + elif result["action"] == "log.warning" and result["event"].get("message"): + log.warning(result["event"].get("message")) + elif result["action"] == "log.info" and result["event"].get("message"): + log.info(result["event"].get("message"), extra={"show": True}) elif result["action"] == "ping": pass diff --git a/gns3/crash_report.py b/gns3/crash_report.py index f92ed280f..2cd34b7ea 100644 --- a/gns3/crash_report.py +++ b/gns3/crash_report.py @@ -50,7 +50,7 @@ class CrashReport: Report crash to a third party service """ - DSN = "https://3dec04c8d64949b41e70d86b398871ee@o19455.ingest.sentry.io/38506" + DSN = "https://235ecbc961abe34327a4a397d8ce427a@o19455.ingest.us.sentry.io/38506" _instance = None def __init__(self): diff --git a/gns3/main.py b/gns3/main.py index 2215e2229..91732b4c9 100644 --- a/gns3/main.py +++ b/gns3/main.py @@ -184,9 +184,9 @@ def exceptionHook(exception, value, tb): # catch exceptions to write them in a file sys.excepthook = exceptionHook - # we only support Python 3 version >= 3.7 - if sys.version_info < (3, 7): - raise SystemExit("Python 3.7 or higher is required") + # we only support Python 3 version >= 3.8 + if sys.version_info < (3, 8): + raise SystemExit("Python 3.8 or higher is required") if parse_version(QtCore.QT_VERSION_STR) < parse_version("5.5.0"): raise SystemExit("Requirement is PyQt5 version 5.5.0 or higher, got version {}".format(QtCore.QT_VERSION_STR)) diff --git a/gns3/modules/builtin/nat.py b/gns3/modules/builtin/nat.py index d8c0d7f54..62b62b7ac 100644 --- a/gns3/modules/builtin/nat.py +++ b/gns3/modules/builtin/nat.py @@ -73,7 +73,7 @@ def defaultSymbol(): :returns: symbol path (or resource). """ - return ":/symbols/cloud.svg" + return ":/symbols/nat.svg" @staticmethod def categories(): diff --git a/gns3/project.py b/gns3/project.py index cab47dd3b..aa3f602e0 100644 --- a/gns3/project.py +++ b/gns3/project.py @@ -721,11 +721,11 @@ def _event_received(self, result, *args, **kwargs): self.projectUpdatedCallback(result["event"]) elif result["action"] == "snapshot.restored": Topology.instance().restoreSnapshot(result["event"]["project_id"]) - elif result["action"] == "log.error": - log.error(result["event"]["message"]) - elif result["action"] == "log.warning": - log.warning(result["event"]["message"]) - elif result["action"] == "log.info": - log.info(result["event"]["message"], extra={"show": True}) + elif result["action"] == "log.error" and result["event"].get("message"): + log.error(result["event"].get("message")) + elif result["action"] == "log.warning" and result["event"].get("message"): + log.warning(result["event"].get("message")) + elif result["action"] == "log.info" and result["event"].get("message"): + log.info(result["event"].get("message"), extra={"show": True}) elif result["action"] == "ping": pass diff --git a/gns3/ui/capture_dialog.ui b/gns3/ui/capture_dialog.ui index c949d2d17..5024a8482 100755 --- a/gns3/ui/capture_dialog.ui +++ b/gns3/ui/capture_dialog.ui @@ -9,16 +9,10 @@ 0 0 - 500 - 147 + 460 + 142 - - - 500 - 147 - - Packet capture diff --git a/gns3/ui/capture_dialog_ui.py b/gns3/ui/capture_dialog_ui.py index b686a3015..91de7c594 100644 --- a/gns3/ui/capture_dialog_ui.py +++ b/gns3/ui/capture_dialog_ui.py @@ -2,19 +2,20 @@ # Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/capture_dialog.ui' # -# Created: Mon May 30 21:49:29 2016 -# by: PyQt5 UI code generator 5.2.1 +# Created by: PyQt5 UI code generator 5.15.6 # -# WARNING! All changes made in this file will be lost! +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. + from PyQt5 import QtCore, QtGui, QtWidgets + class Ui_CaptureDialog(object): def setupUi(self, CaptureDialog): CaptureDialog.setObjectName("CaptureDialog") CaptureDialog.setWindowModality(QtCore.Qt.WindowModal) - CaptureDialog.resize(500, 147) - CaptureDialog.setMaximumSize(QtCore.QSize(500, 147)) + CaptureDialog.resize(460, 142) CaptureDialog.setModal(False) self.gridLayout = QtWidgets.QGridLayout(CaptureDialog) self.gridLayout.setObjectName("gridLayout") @@ -73,5 +74,4 @@ def retranslateUi(self, CaptureDialog): self.uiLinkTypeLabel.setText(_translate("CaptureDialog", "Link type:")) self.uiFileNameLabel.setText(_translate("CaptureDialog", "File name:")) self.uiStartCommandCheckBox.setText(_translate("CaptureDialog", "Start the capture visualization program")) - from . import resources_rc diff --git a/gns3/version.py b/gns3/version.py index a0f346515..59f956837 100644 --- a/gns3/version.py +++ b/gns3/version.py @@ -23,8 +23,8 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.46" -__version_info__ = (2, 2, 46, 0) +__version__ = "2.2.47" +__version_info__ = (2, 2, 47, 0) if "dev" in __version__: try: diff --git a/requirements.txt b/requirements.txt index cf45ff79d..21e540235 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ -jsonschema>=4.17.3,<4.18; python_version >= '3.7' # v4.17.3 is the last version to support Python 3.7 -sentry-sdk==1.39.2,<1.40 +jsonschema>=4.22.0,<4.23 +sentry-sdk==2.1.1,<2.2 psutil==5.9.8 distro>=1.9.0 -truststore>=0.8.0; python_version >= '3.10' +truststore>=0.9.1; python_version >= '3.10' importlib-resources>=1.3; python_version < '3.9' -setuptools>=60.8.1 diff --git a/resources/symbols/nat.svg b/resources/symbols/nat.svg new file mode 100644 index 000000000..0f1347725 --- /dev/null +++ b/resources/symbols/nat.svg @@ -0,0 +1,207 @@ + + + + + + + + + image/svg+xml + + + + + Jeremy Grossmann + + + + + GNS-3 + + + Created for the GNS-3 project (www.gns3.net) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 923d8ab6d..d0acf5ec1 100644 --- a/setup.py +++ b/setup.py @@ -92,8 +92,7 @@ def run_tests(self): "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10",