Skip to content

Commit

Permalink
Merge pull request #3585 from GNS3/release/v2.2.47
Browse files Browse the repository at this point in the history
Release v2.2.47
  • Loading branch information
grossmj committed May 15, 2024
2 parents 854e1fd + c6b5494 commit f29c065
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 45 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions gns3/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gns3/crash_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions gns3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion gns3/modules/builtin/nat.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def defaultSymbol():
:returns: symbol path (or resource).
"""

return ":/symbols/cloud.svg"
return ":/symbols/nat.svg"

@staticmethod
def categories():
Expand Down
12 changes: 6 additions & 6 deletions gns3/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 2 additions & 8 deletions gns3/ui/capture_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>147</height>
<width>460</width>
<height>142</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>500</width>
<height>147</height>
</size>
</property>
<property name="windowTitle">
<string>Packet capture</string>
</property>
Expand Down
12 changes: 6 additions & 6 deletions gns3/ui/capture_dialog_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions gns3/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit f29c065

Please sign in to comment.