Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:ARM
python-jsonpickle
PR292-Python38.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PR292-Python38.patch of Package python-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'
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor