From 52030c34099088bf841980f1161ece00366a08fc Mon Sep 17 00:00:00 2001 From: Peery Date: Mon, 3 Jan 2022 20:16:06 +0100 Subject: [PATCH] Added minimal depdency versions Upgraded dependencies and noticed a breaking change in pyqt5 (QMainWindow.move() requires integer parameters). Fixed it and introduced minimal versions in requirements.txt --- ArtNet/gui/window.py | 14 +++++++------- requirements.txt | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ArtNet/gui/window.py b/ArtNet/gui/window.py index eb07d75..6760f46 100644 --- a/ArtNet/gui/window.py +++ b/ArtNet/gui/window.py @@ -111,7 +111,7 @@ class Window(QtWidgets.QMainWindow): """ screen = QtWidgets.QDesktopWidget().screenGeometry() size = self.geometry() - self.move((screen.width() - size.width()) / 3, (screen.height() - size.height()) / 5) + self.move(int((screen.width() - size.width()) / 3), int((screen.height() - size.height()) / 5)) def check_save_changes(self): """ @@ -757,7 +757,7 @@ class Window(QtWidgets.QMainWindow): self.__main.curr_image_index += 1 if self.__main.curr_image_index >= len(self.__main.all_images): self.__main.curr_image_index = 0 - self.__main.change_image() + self.__main.refresh_shown_image() if self.presence_docker_open: self.toggle_presence_docker() @@ -776,7 +776,7 @@ class Window(QtWidgets.QMainWindow): if self.__main.curr_image_index < 0: self.__main.curr_image_index += len(self.__main.all_images) - self.__main.change_image() + self.__main.refresh_shown_image() if self.presence_docker_open: self.toggle_presence_docker() @@ -988,7 +988,7 @@ class Window(QtWidgets.QMainWindow): unknown_image_index)) if result == QtWidgets.QMessageBox.Yes: self.__main.curr_image_index = unknown_image_index - self.__main.change_image() + self.__main.refresh_shown_image() def on_next_unknown_image_clicked(self): unknown_image_index = self.__main.get_next_unknown_image() @@ -1000,7 +1000,7 @@ class Window(QtWidgets.QMainWindow): unknown_image_index)) if result == QtWidgets.QMessageBox.Yes: self.__main.curr_image_index = unknown_image_index - self.__main.change_image() + self.__main.refresh_shown_image() def on_image_id_spinbox_changed(self, v: int): if self.__tmp_imageid_spinbox == v: @@ -1011,7 +1011,7 @@ class Window(QtWidgets.QMainWindow): v)) if result == QtWidgets.QMessageBox.Yes: self.__main.curr_image_index = v - self.__main.change_image() + self.__main.refresh_shown_image() self.__tmp_imageid_spinbox: int = v @@ -1040,4 +1040,4 @@ class Window(QtWidgets.QMainWindow): else: return - self.__main.change_image() + self.__main.refresh_shown_image() diff --git a/requirements.txt b/requirements.txt index c0812ba..1752e15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -pyqt5 -pyyaml +pyqt5>=5.15.6 +pyyaml>=6.0 cryptography -psycopg2-binary +psycopg2-binary>=2.9 urllib3 validators requests