all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob edf64f9f72a3466783e1e267c791e47f611dd2c9 2799 bytes (raw)
name: gnu/packages/patches/gfeeds-python-39-compat.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 
Index: gfeeds-2.2.0/gfeeds/conf_mapper.py
===================================================================
--- gfeeds-2.2.0.orig/gfeeds/conf_mapper.py
+++ gfeeds-2.2.0/gfeeds/conf_mapper.py
@@ -1,4 +1,4 @@
-from typing import Dict, List, Literal, cast
+from typing import Dict, List, Literal, Union, cast
 from gfeeds.gsettings_wrapper import GSETTINGS_TYPES, GsettingsWrapper
 
 
@@ -9,7 +9,8 @@ class ConfMapper:
     @property
     def feeds(self) -> Dict[
             str,
-            Dict[Literal['tags', 'last-modified'], List[str] | str]
+            Dict[Literal['tags', 'last-modified'],
+                 Union[List[str], str]]
     ]:
         return cast(dict, self.gsw.get('feeds'))
 
Index: gfeeds-2.2.0/gfeeds/gsettings_wrapper.py
===================================================================
--- gfeeds-2.2.0.orig/gfeeds/gsettings_wrapper.py
+++ gfeeds-2.2.0/gfeeds/gsettings_wrapper.py
@@ -80,19 +80,18 @@ class GsettingsWrapper:
 
     def set(self, key: str, value: GSETTINGS_TYPES):
         key = self.convert_and_check_key(key)
-        match value:
-            case str(value):
-                self.gs.set_string(key, value)
-            case dict(value) | list(value):
-                self.set(key, json.dumps(value, cls=CustomJSONEncoder))
-            case bool(value):
-                self.gs.set_boolean(key, value)
-            case int(value):
-                self.gs.set_int(key, value)
-            case float(value):
-                self.gs.set_double(key, value)
-            case _:
-                return self.__type_err()
+        if isinstance(value, str):
+            self.gs.set_string(key, value)
+        elif isinstance(value, dict) or isinstance(value, list):
+            self.set(key, json.dumps(value, cls=CustomJSONEncoder))
+        elif isinstance(value, bool):
+            self.gs.set_boolean(key, value)
+        elif isinstance(value, int):
+            self.gs.set_int(key, value)
+        elif isinstance(value, float):
+            self.gs.set_double(key, value)
+        else:
+            return self.__type_err()
 
     def __type_err(self):
         raise TypeError(
Index: gfeeds-2.2.0/gfeeds/signal_helper.py
===================================================================
--- gfeeds-2.2.0.orig/gfeeds/signal_helper.py
+++ gfeeds-2.2.0/gfeeds/signal_helper.py
@@ -1,7 +1,7 @@
-from typing import Literal, Tuple, Type
+from typing import Literal, Tuple, Union, Type
 from gi.repository import GObject
 
-SignalReturnType = (
+SignalReturnType = Union[
     Literal[
         GObject.TYPE_INT,
         GObject.TYPE_BOOLEAN,
@@ -11,9 +11,8 @@ SignalReturnType = (
         GObject.TYPE_STRING,
         GObject.TYPE_NONE,
         GObject.TYPE_PYOBJECT,
-    ]
-    | None
-)
+    ], None
+]
 
 
 def signal_tuple(

debug log:

solving edf64f9f72 ...
found edf64f9f72 in https://yhetil.org/guix/a247583560a2fd8255c8ba8c4252e18e504970c5.camel@gmail.com/

applying [1/1] https://yhetil.org/guix/a247583560a2fd8255c8ba8c4252e18e504970c5.camel@gmail.com/
diff --git a/gnu/packages/patches/gfeeds-python-39-compat.patch b/gnu/packages/patches/gfeeds-python-39-compat.patch
new file mode 100644
index 0000000000..edf64f9f72

1:15: trailing whitespace.
 
1:16: trailing whitespace.
 
1:26: trailing whitespace.
 
1:32: trailing whitespace.
 
1:60: trailing whitespace.
 
Checking patch gnu/packages/patches/gfeeds-python-39-compat.patch...
Applied patch gnu/packages/patches/gfeeds-python-39-compat.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 edf64f9f72a3466783e1e267c791e47f611dd2c9	gnu/packages/patches/gfeeds-python-39-compat.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.