File PR292-Python38.patch of Package python3-jsonpickle

--- a/jsonpickle/handlers.py
+++ b/jsonpickle/handlers.py
@@ -10,7 +10,9 @@ A handler can be bound to other types by
 from __future__ import absolute_import, division, unicode_literals
 import copy
 import datetime
+import io
 import re
+import sys
 import threading
 import uuid
 
@@ -254,3 +256,18 @@ class LockHandler(BaseHandler):
 
 _lock = threading.Lock()
 LockHandler.handles(_lock.__class__)
+
+
+class TextIOHandler(BaseHandler):
+    """Serialize file descriptors as None because we cannot roundtrip"""
+
+    def flatten(self, obj, data):
+        return None
+
+    def restore(self, data):
+        """Restore should never get called because flatten() returns None"""
+        raise AssertionError('Restoring IO.TextIOHandler is not supported')
+
+
+if sys.version_info >= (3, 8):
+    TextIOHandler.handles(io.TextIOWrapper)
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -12,5 +12,5 @@ pytest
 pytest-cov
 simplejson
 sqlalchemy
-ujson
-yajl; sys_platform != 'win32'
+ujson; python_version < '3.8'
+yajl; sys_platform != 'win32' and python_version < '3.8'
openSUSE Build Service is sponsored by