Hello community,

here is the log from the commit of package python-raet for openSUSE:Factory 
checked in at 2020-04-25 20:26:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-raet (Old)
 and      /work/SRC/openSUSE:Factory/.python-raet.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-raet"

Sat Apr 25 20:26:47 2020 rev:13 rq:796653 version:0.6.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-raet/python-raet.changes  2018-08-27 
12:57:37.912703610 +0200
+++ /work/SRC/openSUSE:Factory/.python-raet.new.2738/python-raet.changes        
2020-04-25 20:29:22.298151617 +0200
@@ -1,0 +2,10 @@
+Thu Apr 23 16:47:20 UTC 2020 - Matej Cepl <mc...@suse.com>
+
+- Add msgpack-1.patch for msgpack 1.0.0 compatibility
+
+-------------------------------------------------------------------
+Mon Apr 20 09:52:11 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Fix resolution without python2
+
+-------------------------------------------------------------------

New:
----
  msgpack-1.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-raet.spec ++++++
--- /var/tmp/diff_new_pack.RKFpng/_old  2020-04-25 20:29:24.174155485 +0200
+++ /var/tmp/diff_new_pack.RKFpng/_new  2020-04-25 20:29:24.174155485 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-raet
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,34 +12,40 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without python2
 Name:           python-raet
 Version:        0.6.8
 Release:        0
 Summary:        Reliable Asynchronous Event Transport protocol
 License:        Apache-2.0
-Group:          Development/Languages/Python
 URL:            https://github.com/RaetProtocol/raet
 Source0:        
https://files.pythonhosted.org/packages/source/r/raet/raet-%{version}.tar.gz
 Patch0:         fix_unittest.patch
+# PATCH-FIX-UPSTREAM msgpack-1.patch gh#RaetProtocol/raet#13 mc...@suse.com
+# this patch makes things totally awesome
+Patch1:         msgpack-1.patch
 BuildRequires:  %{python_module ioflo >= 1.2.4}
 BuildRequires:  %{python_module libnacl >= 1.4.3}
 BuildRequires:  %{python_module msgpack}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools-git >= 1.1}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module six >= 1.6.1}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-BuildRequires:  python2-enum34
 Requires:       python-ioflo >= 1.2.4
 Requires:       python-libnacl >= 1.4.3
 Requires:       python-msgpack
 Requires:       python-six >= 1.6.1
 BuildArch:      noarch
+%if %{with python2}
+BuildRequires:  python-enum34
+%endif
 %ifpython2
 Requires:       python-enum34
 %endif
@@ -51,7 +57,8 @@
 
 %prep
 %setup -q -n raet-%{version}
-%patch0 -p1
+%autopatch -p1
+
 # remove systest testing as it contains invalid py3 syntax
 rm -rf systest/
 
@@ -63,7 +70,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%pytest
 
 %files %{python_files}
 %{python_sitelib}/*

++++++ msgpack-1.patch ++++++
--- a/raet/lane/paging.py
+++ b/raet/lane/paging.py
@@ -162,8 +162,7 @@ class TxBody(Body):
                 if not msgpack:
                     emsg = "Msgpack not installed."
                     raise raeting.PacketError(emsg)
-                self.packed = msgpack.dumps(self.data,
-                                            encoding='utf-8')
+                self.packed = msgpack.dumps(self.data)
         else:
             emsg = "Unrecognized message pack kind '{0}'\n".format(pk)
             console.terse(emsg)
@@ -192,7 +191,7 @@ class RxBody(Body):
 
         if pk == PackKind.json:
             if self.packed:
-                self.data = json.loads(self.packed.decode(encoding='utf-8'),
+                self.data = json.loads(self.packed.decode(),
                                        object_pairs_hook=odict)
         elif pk == PackKind.pack:
             if self.packed:
@@ -200,8 +199,7 @@ class RxBody(Body):
                     emsg = "Msgpack not installed."
                     raise raeting.PacketError(emsg)
                 self.data = msgpack.loads(self.packed,
-                                          object_pairs_hook=odict,
-                                          encoding='utf-8')
+                                          object_pairs_hook=odict)
 
         if not isinstance(self.data, Mapping):
             emsg = "Message body not a mapping\n"
--- a/raet/keeping.py
+++ b/raet/keeping.py
@@ -127,7 +127,7 @@ class Keep(object):
                 raise raeting.KeepError("Invalid filepath ext '{0}' "
                             "needs msgpack installed".format(filepath))
             with ocfn(filepath, "w+b", binary=True) as f:
-                msgpack.dump(data, f, encoding='utf-8')
+                msgpack.dump(data, f)
                 f.flush()
                 os.fsync(f.fileno())
         else:
@@ -154,7 +154,7 @@ class Keep(object):
                     raise raeting.KeepError("Invalid filepath ext '{0}' "
                                 "needs msgpack installed".format(filepath))
                 with ocfn(filepath, "rb", binary=True) as f:
-                    it = msgpack.load(f, object_pairs_hook=odict, 
encoding='utf-8')
+                    it = msgpack.load(f, object_pairs_hook=odict)
             else:
                 it = None
         except EOFError:
--- a/raet/road/packeting.py
+++ b/raet/road/packeting.py
@@ -283,8 +283,7 @@ class TxBody(Body):
                 if not msgpack:
                     emsg = "Msgpack not installed."
                     raise raeting.PacketError(emsg)
-                self.packed = msgpack.dumps(self.data,
-                                            encoding='utf-8')
+                self.packed = msgpack.dumps(self.data)
         elif bk == BodyKind.raw:
             self.packed = self.data # data is already formatted string
 
@@ -308,9 +307,8 @@ class RxBody(Body):
 
         if bk == BodyKind.json:
             if self.packed:
-                kit = json.loads(self.packed.decode(encoding='utf-8'),
-                                 object_pairs_hook=odict,
-                                 encoding='utf-8')
+                kit = json.loads(self.packed.decode(),
+                                 object_pairs_hook=odict)
                 if not isinstance(kit, Mapping):
                     emsg = "Packet body not a mapping."
                     raise raeting.PacketError(emsg)
@@ -321,8 +319,7 @@ class RxBody(Body):
                     emsg = "Msgpack not installed."
                     raise raeting.PacketError(emsg)
                 kit = msgpack.loads(self.packed,
-                                    object_pairs_hook=odict,
-                                    encoding='utf-8')
+                                    object_pairs_hook=odict)
                 if not isinstance(kit, Mapping):
                     emsg = "Packet body not a mapping."
                     raise raeting.PacketError(emsg)
--- a/raet/road/test/test_packeting.py
+++ b/raet/road/test/test_packeting.py
@@ -375,8 +375,8 @@ class BasicTestCase(unittest.TestCase):
 
         tray0 = packeting.TxTray(stack=stack, data=data, body=stuff)
         tray0.pack()
-        self.assertEquals(tray0.packed, b'   0   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  83  84  85  86  87  88 
 89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 
289 290 291 292 293 294 295 296 297 298 299')
-        self.assertEquals(len(tray0.packets), 2)
+        self.assertEqual(tray0.packed, b'   0   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  83  84  85  86  87  88  
89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 
289 290 291 292 293 294 295 296 297 298 299')
+        self.assertEqual(len(tray0.packets), 2)
 
         tray1 = packeting.RxTray(stack=stack)
         for packet in tray0.packets:
@@ -416,7 +416,7 @@ class BasicTestCase(unittest.TestCase):
                                            'fk': 0,
                                            'fl': 0,
                                            'fg': '08'})
-        self.assertEquals( tray1.body, stuff)
+        self.assertEqual( tray1.body, stuff)
 
 class StackTestCase(unittest.TestCase):
     '''

Reply via email to