From fc8c93cdfc847d07a756cd82de6a4ce6da3721b8 Mon Sep 17 00:00:00 2001 From: tigro Date: Sun, 24 Dec 2023 22:02:10 +0300 Subject: [PATCH] Fix work with Python 3.6 --- SOURCES/0002-Fix-work-with-Python-3.6.patch | 57 +++++++++++++++++++++ SPECS/chrome-gnome-shell.spec | 6 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0002-Fix-work-with-Python-3.6.patch diff --git a/SOURCES/0002-Fix-work-with-Python-3.6.patch b/SOURCES/0002-Fix-work-with-Python-3.6.patch new file mode 100644 index 0000000..ed3dc09 --- /dev/null +++ b/SOURCES/0002-Fix-work-with-Python-3.6.patch @@ -0,0 +1,57 @@ +From 0619a89ea7cd42996cdd45dbe1bf8a0595ac2cec Mon Sep 17 00:00:00 2001 +From: tigro +Date: Sun, 24 Dec 2023 22:00:07 +0300 +Subject: [PATCH 2/2] Fix work with Python 3.6 + +--- + gnome_browser_connector/application.py | 4 ++-- + gnome_browser_connector/connector.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gnome_browser_connector/application.py b/gnome_browser_connector/application.py +index 2069a34..8322202 100644 +--- a/gnome_browser_connector/application.py ++++ b/gnome_browser_connector/application.py +@@ -4,7 +4,7 @@ import signal + import sys + import traceback + from types import TracebackType +-from typing import Any, Callable, Optional, Sequence ++from typing import Type, Any, Callable, Optional, Sequence + + from gi.repository import GLib, Gio + +@@ -118,7 +118,7 @@ class Application(BaseGioApplication): + + def default_exception_hook( + self, +- exception_type: type[BaseException], ++ exception_type: Type[BaseException], + value: BaseException, + tb: TracebackType + ) -> None: +diff --git a/gnome_browser_connector/connector.py b/gnome_browser_connector/connector.py +index a81b5ed..9516609 100644 +--- a/gnome_browser_connector/connector.py ++++ b/gnome_browser_connector/connector.py +@@ -3,7 +3,7 @@ + import json + import struct + import sys +-from typing import Any, Optional ++from typing import Dict, Any, Optional + from gi.repository import Gio, GLib, GObject + + from .base import ApplicationHandler, BaseGioApplication +@@ -189,7 +189,7 @@ class Connector(ApplicationHandler): + except IOError as e: + raise Exception(f'IOError occured: {e.strerror}') + +- def process_request(self, request: dict[str, Any]) -> None: ++ def process_request(self, request: Dict[str, Any]) -> None: + self._log.debug("Execute: to %s", request['execute']) + + if request['execute'] == 'initialize': +-- +2.43.0 + diff --git a/SPECS/chrome-gnome-shell.spec b/SPECS/chrome-gnome-shell.spec index ad3c7c5..1fecdcf 100644 --- a/SPECS/chrome-gnome-shell.spec +++ b/SPECS/chrome-gnome-shell.spec @@ -3,7 +3,7 @@ Name: chrome-gnome-shell Version: 42.1 -Release: 1%{?dist} +Release: 1%{?dist}.inferit Summary: Support for managing GNOME Shell Extensions through web browsers License: GPLv3+ @@ -22,6 +22,7 @@ Requires: mozilla-filesystem Requires: python3-gobject-base Patch1: 0001-Don-t-use-enhanced-annotations.patch +Patch2: 0002-Fix-work-with-Python-3.6.patch %description Browser extension for Google Chrome/Chromium, Firefox, Vivaldi, Opera (and @@ -56,6 +57,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.BrowserC %{_datadir}/icons/hicolor/*/apps/org.gnome.BrowserConnector.png %changelog +* Sun Dec 24 2023 Arkady L. Shane - 42.1-1.inferit +- Fix work with Python 3.6 + * Tue Jul 25 2023 MSVSphere Packaging Team - 42.1-1 - Rebuilt for MSVSphere 8.8