From 2df18ee04e9ec6c2e2adf14a8a5458dd3725f956 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 5 Mar 2024 00:45:26 +0800 Subject: [PATCH 01/14] Upgrade sentry-sdk to version 1.40.6 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cf45ff79d..b6191ec6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ 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 +sentry-sdk==1.40.6,<1.41 psutil==5.9.8 distro>=1.9.0 truststore>=0.8.0; python_version >= '3.10' From 131ef09b5588e00c7dc01d12fdaa6dfc6285aede Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 5 Mar 2024 01:07:17 +0800 Subject: [PATCH 02/14] Development on 2.2.47.dev1 --- gns3/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3/version.py b/gns3/version.py index a0f346515..ec9bdd67a 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.dev1" +__version_info__ = (2, 2, 47, 99) if "dev" in __version__: try: From 9e89cf5ad50a082d687e16c65c28349884f786b3 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 7 Mar 2024 17:18:30 +0100 Subject: [PATCH 03/14] Only show log message if event has "message" --- gns3/controller.py | 12 ++++++------ gns3/project.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) 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/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 From cf3c5c09fa870cb460ad452464b2294bde6babb6 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 22 Apr 2024 18:51:29 +0700 Subject: [PATCH 04/14] Add NAT symbols --- gns3/modules/builtin/nat.py | 2 +- resources/symbols/nat.svg | 207 ++++++++++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 resources/symbols/nat.svg 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/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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 38b98cd883880a2d30dee379184858e7a40e8d15 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 May 2024 18:05:08 +0700 Subject: [PATCH 05/14] Remove dev requirements for Python 3.6 --- dev-requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 From 19157ab49d1aadc4e76092db5623b08eea1d2b72 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 May 2024 18:23:59 +0700 Subject: [PATCH 06/14] Drop Python 3.7 --- gns3/main.py | 6 +++--- setup.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) 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/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", From 8aaefac91b99c12e337a269ead3167becfbc6368 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 May 2024 18:37:41 +0700 Subject: [PATCH 07/14] Upgrade jsonschema and aiohttp --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b6191ec6a..c59947f7d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -jsonschema>=4.17.3,<4.18; python_version >= '3.7' # v4.17.3 is the last version to support Python 3.7 +jsonschema>=4.22.0,<4.23 sentry-sdk==1.40.6,<1.41 psutil==5.9.8 distro>=1.9.0 From 3707758388ae3305e703e2e72a95b85614ae2f0f Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 May 2024 18:58:38 +0700 Subject: [PATCH 08/14] Upgrade aiohttp, sentry-sdk and truststore --- requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index c59947f7d..4bd060b12 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ jsonschema>=4.22.0,<4.23 -sentry-sdk==1.40.6,<1.41 +sentry-sdk==2.2.1,<2.3 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 From bc10c69a2d3303e295212b7ae0bf83ad17b11922 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 May 2024 19:03:08 +0700 Subject: [PATCH 09/14] Change sentry-sdk version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4bd060b12..21e540235 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ jsonschema>=4.22.0,<4.23 -sentry-sdk==2.2.1,<2.3 +sentry-sdk==2.1.1,<2.2 psutil==5.9.8 distro>=1.9.0 truststore>=0.9.1; python_version >= '3.10' From 2f0d2063cf8dd8f8896b1956702bba369847edc2 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 10 May 2024 12:58:35 +0700 Subject: [PATCH 10/14] Remove maximum size for capture dialog. Ref #3576 --- gns3/ui/capture_dialog.ui | 10 ++-------- gns3/ui/capture_dialog_ui.py | 12 ++++++------ 2 files changed, 8 insertions(+), 14 deletions(-) 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 From 812aedebe3d615af3e3a6128b6e0aed8349ff050 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 15 May 2024 12:14:48 +0700 Subject: [PATCH 11/14] Release v2.2.47 --- CHANGELOG | 11 +++++++++++ gns3/crash_report.py | 2 +- gns3/version.py | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) 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/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/version.py b/gns3/version.py index ec9bdd67a..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.47.dev1" -__version_info__ = (2, 2, 47, 99) +__version__ = "2.2.47" +__version_info__ = (2, 2, 47, 0) if "dev" in __version__: try: From e2cc378aee75c04417b1027fbd4d3301cb6dc123 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 15 May 2024 17:10:04 +0700 Subject: [PATCH 12/14] Use ubuntu:latest for running tests inside Docker container --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cf810aaf..d5a0ee174 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # 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 @@ -13,4 +13,4 @@ RUN pip3 install --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 From 02b14f6aea4229afedf7c4f3403e37018fc4116d Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 15 May 2024 17:12:42 +0700 Subject: [PATCH 13/14] Call pip as a Python module --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d5a0ee174..8537afbfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ 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 --no-cache-dir -r /dev-requirements.txt ADD . /src WORKDIR /src From c6b5494ce6dc63ad4cb3410ce21cfc5a577126ba Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 15 May 2024 17:19:54 +0700 Subject: [PATCH 14/14] Use system Python --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8537afbfd..c9c4154d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get clean ADD dev-requirements.txt /dev-requirements.txt ADD requirements.txt /requirements.txt -RUN python3 -m pip 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